From MHCGraphics
; Mead example file -- extruded object
;
; Jim Teresco
; Computer Science 110
; Mount Holyoke College
;
; $Id: ExtrudePenta.scm 502 2008-02-20 19:02:14Z terescoj $
;
(require (lib "Defs.ss" "Mead"))
; we start with a polygon that defines the outline of
; a pentagon
(define pentaOutline
(2to3d (polygon 5)))
; we then "extrude" from the original polygon to some
; transformation of that polygon, connecting up matching
; sides with planar surfaces. The result is a Mesh object
; that we give a name, "extrudedPenta"
(define extrudedPenta
(extrude pentaOutline
(xform
(zRot 20)
(translate 0 0 -100)
)
)
)
; Let's add a few to the scene
(tell scene
(add extrudedPenta redPlaster)
(add extrudedPenta bluePlaster
(xform
(xRot 45)
(translate -200 0 0))
)
(add extrudedPenta magentaPlaster
(xform
(yRot 45)
(translate 200 0 0))
))
; Some extra light
(tell scene
(add bulb '(pos 400 400 -300)))
(tell camera
(background white)
(pos '(200 200 -500))
(shoot))