Stacks

DRAFT art lisp

Table of Contents

Pseudo-3D Rectangles

(defun make-rect3 (o s z)
  (make-polygon
   (list
    (vec3 (x o) (y o) z)
    (vec3 (+ (x s) (x o)) (y o) z)
    (vec3 (+ (x s) (x o)) (+ (y s) (y o)) z)
    (vec3 (x o) (+ (y s) (y o)) z))))

Square One

(with-scene scene
 (add-shape scene (make-rect3 (vec2 0.0 0.0) (vec2 1.0 1.0) 0))
 (plot-pseudo3d scene "images/stacks/square_one.png"))
square_one.png

Stacking

(with-scene scene
 (loop for i from 0 to 0.5 by 0.1 do
   (add-shape scene (make-rect3 (vec2 i i) (vec2 1.0 1.0) i)))
 (plot-pseudo3d scene "images/stacks/stacking.png"))
stacking.png

If you have an idea how this page could be improved or a comment send me a mail.