Commit 31b91edd authored by Dave Cooper's avatar Dave Cooper
Browse files

adding more to geom chapter

parent d87c4257
(in-package :gdl-user)
(define-object tower (base-object)
:input-slots
((height 42)
(block-height 1)
(width +phi+)
(length (* (the width) +phi+)))
:computed-slots
((number-of-blocks (floor (the height)
(the block-height))))
:objects
((blocks :type 'box
:sequence (:size (the number-of-blocks))
:length (the length)
:height (the block-height)
:width (the width)
:center (translate (the center) :up
(* (the-child height)
(the-child index)))
:orientation (alignment :rear (rotate-vector-d
(the (face-normal-vector :rear))
(twice (the-child index))
(the (face-normal-vector :top)))))))
(in-package :gdl-user)
(define-object vertical-cylinder (base-object)
:objects
((horizontal-cylinder :type 'cylinder
:display-controls (list :color :green)
:length 10 :radius 3)
(vertical-cylinder :type 'cylinder
:length 10 :radius 3
:display-controls (list :color :red)
:orientation (alignment :rear
(the (face-normal-vector :top))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment