diff options
Diffstat (limited to 'experimental/tectonics/world.c')
-rw-r--r-- | experimental/tectonics/world.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/experimental/tectonics/world.c b/experimental/tectonics/world.c index f5b6efb..dc042ee 100644 --- a/experimental/tectonics/world.c +++ b/experimental/tectonics/world.c @@ -53,7 +53,6 @@ static void relax_points(struct world_t *world, int iterations) // approximate centroids for (int i=0; i<iterations; i++) { - printf("%02f%%\n", 100*((double)i+1)/iterations); // generate a random point and find the closest // terrain point double x = rand01(); @@ -63,7 +62,7 @@ static void relax_points(struct world_t *world, int iterations) (struct point_t){x, y}); if (closest == -1) { - printf("WARN: bad closest point!\n"); + log_msg(WARN, "bad closest point for (%f, %f)", x, y); } else { // average the centroid towards that random point @@ -109,14 +108,14 @@ void create_world(struct world_t *world, int n_points) struct point_t *pt = world->points + i; pt->x = rand01(); pt->y = rand01(); - - //quadtree_insert(&(world->tree), world->points, i); } rebuild_tree(world); - for (int i=0; i<15; i++) - relax_points(world, 10*world->n_points); + for (int i=0; i<1; i++) { + log_msg(INFO, "relaxing points - iteration %d", i+1); + relax_points(world, 50*world->n_points); + } } |