Skip to main content

quad-edge data structure

Project description

# PyDelaunator Test of implementation of a quad-edge data structure using python.

This little project is here to study quad-edge structure for further developments of [Delaunator](https://pypi.python.org/pypi/delaunator), which waits since a long time.

There is a small GUI (done with the awesome [pyglet](http://pyglet.org) module) that allow one to play with the triangulation.

## Installation/requirements Installation in one command, including dependancies:

pip install pydelaunator

## Usage The package run the GUI if launched directly:

python -m pydelaunator

Use –help for options.

The higher-level API is the [Placer object](pydelaunator/placer.py). See [tests](pydelaunator/test/test_placer.py) for other usage examples.

## Notes ### Goals This work is mainly here to prototype a better API and detect where and why are bugs in Delaunator.

Efficiency is not a primarily goal, altough, since interfacing python with other languages is a fun exercise, i probably will try some optimizations related to C. Similarly, some algorithms ideas could be easily tested here.

Therefore, PyDelaunator is also a playground for further researchs.

### Computational geometry [Codes used there](pydelaunator/geometry.py) are mainly constitued from online ressources (SO, wikipedia). They are not toroughly [tested](pydelaunator/test/test_geometry.py), but as far as the triangulation works.

Implementating them in C could probably speed them up a little, since in python arithmetic codes tends to be costly.

### Duality Vertex/data Maybe not the most optimized, but a mapping object/vertex with a dict is certainly the less invasive for end-user, [as implemented in the Placer object](pydelaunator/placer.py).

Other ways to go:

  • client objects inheriting from Vertex

  • client objects keeping a reference to their vertex

These two ways are probably far more efficient in case of big data. However, if current API allow these, Placer object continue to track objects using the dict mapping. Modification of the Placer is needed, or an alternative implementation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydelaunator-0.0.10.tar.gz (35.6 kB view details)

Uploaded Source

File details

Details for the file pydelaunator-0.0.10.tar.gz.

File metadata

File hashes

Hashes for pydelaunator-0.0.10.tar.gz
Algorithm Hash digest
SHA256 28ef0127c62d845ef603d16cd85e21a2daf7751b0c4e89fa9416bdc2e22ee468
MD5 02086782724368e511edc79e3721a0f3
BLAKE2b-256 523a9c6c3074bdc8bc536dae190b50a2821c926b85f57228d28a83cb392b5869

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page