From 8cde16f3d706947a8c1df1d0e33cec8e274eaea7 Mon Sep 17 00:00:00 2001 From: mika <mika@mika-ideacentre-Y710-Cube-15ISH> Date: Wed, 5 Dec 2018 05:16:34 +0100 Subject: [PATCH] some todos --- src/delaunay.c | 1 + src/dwyer.c | 1 + src/main.c | 5 ++--- src/voronoi.c | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/delaunay.c b/src/delaunay.c index f90cea1..fcdcca8 100644 --- a/src/delaunay.c +++ b/src/delaunay.c @@ -94,6 +94,7 @@ double det2(double a, double b, double c, double d) { * https://de.wikipedia.org/wiki/Cramersche_Regel * https://de.wikipedia.org/wiki/Determinante */ +//TODO seperate radius from this function circle circleFrom3Points(vertex v1, vertex v2, vertex v3) { circle c; double ax = 2*(v1.x-v2.x); diff --git a/src/dwyer.c b/src/dwyer.c index 71c5e8e..d030ff1 100644 --- a/src/dwyer.c +++ b/src/dwyer.c @@ -765,6 +765,7 @@ EDGE_PTR e; } } +//TODO replace other circle function with this? struct VEC2 circle_center(a,b,c) /* returns the center of the circle passing through A, B & C. */ struct VEC2 a,b,c; diff --git a/src/main.c b/src/main.c index da68a4f..845c941 100644 --- a/src/main.c +++ b/src/main.c @@ -26,10 +26,9 @@ int main(int argc, char *argv[]) { } - //vertex *points = malloc(numberOfPoints * sizeof(vertex)); - vertex points[numberOfPoints]; + vertex *points = malloc(numberOfPoints * sizeof(vertex)); generatePoints(points, numberOfPoints); - printf("%lu\n", sizeof(points)); + printf("%lu\n", numberOfPoints * sizeof(vertex)); //drawPoints(points, numberOfPoints); #ifdef OUTPUTFILE diff --git a/src/voronoi.c b/src/voronoi.c index 338bf89..250a769 100644 --- a/src/voronoi.c +++ b/src/voronoi.c @@ -121,6 +121,7 @@ void voronoiCws(vertex* S, int size) { } } lastV = currentV; +#ifdef DEL if(i < j && i < k) { if(isTriangle == 2){ #ifdef OUTPUTFILE @@ -128,6 +129,7 @@ void voronoiCws(vertex* S, int size) { #endif } } +#endif j = k; } while(j != j0); } -- GitLab