(clear) (hint-cast-shadow) (define l (list (build-cube))) (define camob (car l)) (hint-wire) (wire-colour 0) (hint-unlit) (define (add-to-list n) (apply-transform n) (grab n) (ungrab) (set! l (append l (list n))) (cond ((> (length l) 1000) (destroy (car l)) (when (eq? (car l) camob) (begin (set! camob n) (lock-camera camob))) (set! l (cdr l))))) (define (render) (when (> (gh 10) 1) (begin (push) ;(translate (vector (* 5 (gh 1)) (* 30 (gh 2)) (* 100 (gh 3)))) ;(colour (vadd (vector 0.1 0.1 0.1) (vmul (vector (gh 3) (gh 6) (gh 9)) 0.01))) (scale (vadd (vector 1 1 1) (vmul (vector (gh 5) (gh 8) (gh 6)) 0.1))) (let ((p (build-cube))) (with-primitive p (pdata-map! (lambda (c) (vector 0 0 0)) "c") (hint-vertcols) (pdata-set! "c" 8 (vector 1 1 0)) (pdata-set! "c" 9 (vector 1 1 0)) (pdata-set! "c" 10 (vector 1 1 0)) (pdata-set! "c" 11 (vector 1 1 0))) (add-to-list p)) (pop))) (animate 0 l)) (define (animate n l) (grab (car l)) ;(rotate (vector 0 (* 1 (gh n)) 0)) (translate (vector (* 0.01 (gh n)) 0 (* 0.06 (gh (+ 11 n))))) (ungrab) (if (eq? (cdr l) '()) '() (animate (+ n 1) (cdr l)))) (push) (colour (vector 0 1 0)) (scale (vector 100 1 100)) (rotate (vector 90 0 0)) (pop) (line-width 2) (clear-colour 0) #;(with-state ; (hint-unlit) (translate (vector 0 -10 0)) (rotate (vector 90 0 0)) (scale (vector 10000 10000 10000)) (build-plane)) (light-diffuse 0 (vector 1 1 1)) (define lt (make-light 'point 'free)) (light-position lt (vector 0 1000 0)) (light-diffuse lt (vector 1 1 0)) (shadow-light lt) (camera-lag 0.1) (blur 1) (gain 1000) (every-frame (render))