commit 62e111dcd958e75038718c61aab84bd7a76d6e3b
parent 2bd9a53e59878ce0cb35aa4b587be11cab29ed07
Author: William Casarin <jb55@jb55.com>
Date: Thu, 3 May 2018 13:47:36 -0700
use blue noise sampling
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/update.c b/src/update.c
@@ -105,8 +105,11 @@ void update_terrain(struct game *game) {
int n_samples =
(terrain->size * game->terrain.size) * scale * scale;
+ /* struct point *samples = */
+ /* uniform_samples(n_samples, game->terrain.size); */
+
struct point *samples =
- uniform_samples(n_samples, game->terrain.size);
+ poisson_disk_samples(45.0, game->terrain.size, 30, &n_samples);
terrain->samples = samples;
terrain->n_samples = n_samples;