From 904f4c89de4abb09e48c9a4b842cfb96e1a9e477 Mon Sep 17 00:00:00 2001 From: Dan Frumin Date: Fri, 27 Dec 2019 19:18:26 +0100 Subject: [PATCH] prettier noise --- outrun.rkt | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/outrun.rkt b/outrun.rkt index 943a071..c381ac8 100644 --- a/outrun.rkt +++ b/outrun.rkt @@ -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))))]) + (let ([x i] + [z j] + [y (scale-number + (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)