prettier noise

This commit is contained in:
Dan Frumin 2019-12-27 19:18:26 +01:00
parent 8240361ffa
commit 904f4c89de
1 changed files with 18 additions and 11 deletions

View File

@ -27,16 +27,21 @@
[lines-frozen (freeze (apply combine lines))]
[spheres (for*/list ([i (in-range -10 10)]
[j (in-range -1 10)])
(with-color (rgba-hex "ff71ce" 0.8)
(let ([x i]
[z j]
[y (scale-number
(perlin (scale-number i -10 10 0 1)
(scale-number j -1 10 0 1)
(scale-number t 0 2000 0 1))
0 1
1 5)])
(sphere (pos x y z) 0.2))))])
(perlin (scale-number i -10 10 -1 1)
(scale-number j -1 10 -1 1)
(scale-number t 0 2000 -1 1))
-1 1
0 4)]
[alpha (scale-number
(simplex (scale-number i -10 10 -1 1)
(scale-number j -1 10 -1 1)
(scale-number t 0 2000 -1 1))
-1 1
0.1 0.8)])
(with-emitted (emitted-hex "ff71ce" alpha) (sphere (pos x y z) 0.2))))])
(combine lines-frozen
spheres
(move (rotate-y lines-frozen 90)
@ -73,5 +78,7 @@
#:on-draw on-draw
#:on-key on-key
#:stop-state? stop-state?
#:name "Outrun")
#:name "sketch"
#:width 800
#:height 600)