summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mikos <metastability@opencompositing.org>2007-12-26 10:20:41 +1030
committerDavid Mikos <metastability@opencompositing.org>2007-12-26 10:20:41 +1030
commitac0a52e21627156cffec2f4b02adbc7ed4bd5127 (patch)
treeadafb36a9e91723af4b0e38802ff47716e0ada78
parentc08c7f48ff1fae6c924c204ab9214598fcb69f3a (diff)
downloadsnowglobe-ac0a52e21627156cffec2f4b02adbc7ed4bd5127.tar.gz
snowglobe-ac0a52e21627156cffec2f4b02adbc7ed4bd5127.tar.bz2
More random spread of snowflakes.
-rw-r--r--movement.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/movement.c b/movement.c
index 24c8b69..1d3c8af 100644
--- a/movement.c
+++ b/movement.c
@@ -20,7 +20,9 @@ void newSnowflakePosition(SnowglobeScreen *as, int i) {
ang += (0.5+((float) sector))*2*PI/q;
ang = fmodf(ang,2*PI);
- float d = randf(r)*factor;
+ float d = randf(1);
+ d=(1-d*d)*r*factor;
+
as->snow[i].x = d*cosf(ang);
as->snow[i].y = d*sinf(ang);
as->snow[i].z = 0.5;