/* * voronoi.h * * Created on: 23 Nov 2018 * Author: Mika */ #ifndef SRC_VORONOI_H_ #define SRC_VORONOI_H_ #include "delaunay.h" /** * a vertex represented by a circle, where it is the center */ typedef struct { vertex a; vertex b; vertex c; } vertexCircle; //TODO better name /** * an edge represented by 2 vertexCircles */ typedef struct { vertexCircle a; vertexCircle b; } edgeCircle; /** * returns the first Voronoi vertex on the boundary of the Voronoi region associated with the point p e S * @param point p e S * @return the first Voronoi vertex on the boundary of the Voronoi region associated with p */ vertexCircle firstVoronoiVertexAssociatedWith(vertex p); /** * returns the next Voronoi edge incident to e.a, following e in the clockwise direction * @param e * @return */ edgeCircle clockwiseNextVoronoiEdge(edgeCircle e); /** * returns the Voronoi edge following e along the boundary of its Voronoi region * @param e * @return */ edgeCircle nextVoronoiEdgeOnBoudary(edgeCircle e); int reportEdge(edge l, FILE *out); void voronoiCws(vertex* S, int size, FILE *out, int draw); #endif /* SRC_VORONOI_H_ */