diff --git a/src/voronoi.c b/src/voronoi.c new file mode 100644 index 0000000000000000000000000000000000000000..16988eaff82084b84f04e366b0dbfa8490dce64f --- /dev/null +++ b/src/voronoi.c @@ -0,0 +1,10 @@ +/* + * voronoi.c + * + * Created on: 23 Nov 2018 + * Author: Mika + */ + +#include "voronoi.h" + + diff --git a/src/voronoi.h b/src/voronoi.h new file mode 100644 index 0000000000000000000000000000000000000000..07b7f414d1f5cf9a9aead66298c134ec5fe877d0 --- /dev/null +++ b/src/voronoi.h @@ -0,0 +1,53 @@ +/* + * 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); + + +#endif /* SRC_VORONOI_H_ */