Created
February 12, 2011 04:47
-
-
Save nowl/823527 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *world* | |
(append | |
(loop for count below 50 collect | |
(let* ((r (random 256)) | |
(g (random 256)) | |
(b (random 256)) | |
(angle (/ (* 6 3.14159 count) 50)) | |
(rad (- 2 (* 2 (/ count 50.0)))) | |
(x (* rad (sin angle))) | |
(z (* rad (cos angle))) | |
(y (- (/ count 12.0) 1.5))) | |
(insert-sphere x y z 0.2 r g b 0.05))) | |
(list | |
(make-instance 'plane | |
:position (make-vect :x 0.0 :y -1.5 :z 0.0) | |
:normal-facing (make-vect :x 0.0 :y 1.0 :z 0.0) | |
:color (make-instance 'color | |
:red 75 :green 0 :blue 0 | |
:min-color 0 :max-color 255) | |
:ambience 0.1 | |
:reflectivity 0.0)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment