From de5a16e7e28a5d166d18ad73ef435bed6c80255d Mon Sep 17 00:00:00 2001 From: Dan Frumin Date: Mon, 30 Dec 2019 18:58:59 +0100 Subject: [PATCH] playing around with pict3d-die-cut --- outrun.rkt | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/outrun.rkt b/outrun.rkt index a778b74..f26bc86 100644 --- a/outrun.rkt +++ b/outrun.rkt @@ -1,6 +1,7 @@ #lang racket (require pict3d pict3d/universe + pict3d-die-cut "pict3d-lib.rkt" "noise.rkt") @@ -87,18 +88,18 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the static mesh -(define (mesh t) +(define mesh (let* ([lines - (for*/list ([i (in-range -10 10)] - [j (in-range 0 10)]) + (for*/list ([i (in-range -10 20)] + [j (in-range 0 20)]) (with-color (rgba-hex "05ffa1") (move (cylinder (pos (- 0.1) (- 0.1) -5) (pos 0.1 0.1 10)) (dir i 0 j))))] [lines-comb (apply combine lines)]) (freeze (combine lines - (move (rotate-y lines-comb 90) - (dir -7 0 5)))))) + (move (rotate-y lines-comb -90) + (dir 15 0 6)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the bendy pipe @@ -142,6 +143,20 @@ (define frozen-sspheres (freeze (sspheres 1000))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; the axis + +(define axis-pict + (combine + (with-emitted (emitted "red") + (arrow origin (pos 1 0 0))) + (with-emitted (emitted "green") + (arrow origin (pos 0 1 0))) + (with-emitted (emitted "blue") + (arrow origin (pos 0 0 1))))) + +(define frozen-axis (freeze axis-pict)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the lights @@ -175,11 +190,16 @@ (point-at (camera-position s) (camera-direction s))) (make-sunlight (scene-state-dsun s)) - ;; (move-y (road t) -1) - (spheres t) - (scene t) + (move-y (road t) -1) + ;;(spheres t) + ;;(scene t) frozen-sspheres - (mesh t) + mesh + ;; (move (rotate-y + ;; (die-cut-text "OwO" #:depth 0 #:center? #t #:top? #t #:bottom? #t #:sides? #t) + ;; 180) + ;; (dir 0 3 10)) + ;;frozen-axis )) (define (on-key s n t k)