Added box_cut tool and some documentation.

Removed (width,height) from the fortune algorithm's contructor, as it was no longer being used.

Setup script to install everything.

Added a tolerance level to account for round-off errors when computing intersection of two lines. Right now it is set to epsilon as default.

Moved everything into a package that can be easly installed.

Test association now colours in all sites. The site edges are now sorted in order. Edge has a flip function which reverses left and right site points.

Voronoi.sites is now a dictionary of edges associated with each point. This can be tested by running test-association.py. Also a few internal API changes.

Changed the API a bit. Fortune algorithm is run right away, with the list of edges available at Voronoi.edges. The edges are Edge objects. They can be trimmed to a rectangle using tools.img_coord. The general test cycle is now implemented inside unittests.run_test.

Added a test where all of the points are mirrored vertically.

Sort the points in x first, since this is an assumption of the implementation.

Fixed circle_check on intersection when start is None. Also find_leaf works when there is only one intersection.

5 years agoinsert_parabola fixed to work when the current site and new site are at the same y-value.

insert_parabola fixed to work when the current site and new site are at the same y-value.

Added a simple vertical test case.

The split edges created during the insertion of a new node are now joined at the end.

Renamed the list used to store all edges as internal_edges, so it is not confused with the edges method.

Added functions to dump the current tree in graphviz format and to print the beachline.

Parametric edges.

Added code to dump the structure of the tree.

Circle check now uses dot product to determine whether to end an edge inside circle_check.x

Infinite edges are now left as infinite, and clipped for drawing by Edge.img_coord.

Box clipping now uses parametrization of the edge line.

Width/height typo in test-random.py.

Removed opencv stuff from inside voronoi module, since it shouldn't

depend on it.

depend on it.

Initial import.