diff --git a/outrun.rkt b/outrun.rkt index deb8875..c36c85c 100644 --- a/outrun.rkt +++ b/outrun.rkt @@ -16,6 +16,9 @@ #:specular 0.3 #:roughness 0.5)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; the wavy road thingie + (define (road t) (define i-range-start -11) (define i-range-end 11) @@ -48,6 +51,9 @@ #:back? #t))]) (combine mesh))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; the jumping spheres + (define (spheres t) (define (calculate-noise i j) (scale-number (perlin (scale-number i -10 10 -1 1) @@ -73,6 +79,9 @@ (sphere (pos x y z) 0.2))))) (combine spheres)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; the static mesh + (define (mesh t) (let* ([lines (for*/list ([i (in-range -10 10)] @@ -81,12 +90,15 @@ (move (cylinder (pos (- 0.1) (- 0.1) -5) (pos 0.1 0.1 10)) (dir i 0 j))))] - [lines-frozen (freeze (apply combine lines))]) - (combine lines-frozen - (move (rotate-y lines-frozen 90) - (dir -7 0 5))))) + [lines-comb (apply combine lines)]) + (freeze (combine lines + (move (rotate-y lines-comb 90) + (dir -7 0 5)))))) -(define my-pipe (tessellate (pipe origin (dir 1 1/2 1)))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; the bendy pipe + +(define my-pipe (tessellate (with-color (rgba-hex "01cdfe") (pipe origin (dir 1 1/2 1))))) (define (bend+ p x y z) (bend p (scale-number (perlin x y z) -1 1 -180 180))) @@ -96,10 +108,13 @@ 90) 2)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; the lights + (define (make-sunlight dsun) (sunlight (angles->dir -30 (* 10 dsun)) - (emitted "white" 1/2))) + (emitted-hex "fffb96" 1/2))) ;; Calculate camera position based on the state (define (camera-position s) @@ -114,9 +129,9 @@ (camera-direction s))) (make-sunlight (scene-state-dsun s)) (mesh t) - (move-y (road t) -1) - ;;(spheres t) - ;;(scene t) + ;; (move-y (road t) -1) + (spheres t) + (scene t) )) (define (on-key s n t k)