From MHCGraphics
; Mead example file -- orthographic vs. perspective projection
;
; Jim Teresco
; Computer Science 110
; Mount Holyoke College
; March 4, 2008
;
; $Id: OrthographicVsPerspective.scm 535 2008-03-04 22:06:28Z terescoj $
;
(require (lib "Defs.ss" "Mead"))
; create a simple scene with several primitive objects
(tell scene
(add (new Plane) whitePlaster)
(add cube redPlaster
(translate 100 50 0))
(add cube bluePlaster
(translate -100 50 0))
(add cone greenPlaster
(translate 100 50 150))
(add cone magentaPlaster
(translate -100 50 150))
(add sphere yellowPlaster
(translate 100 50 300))
(add sphere cyanPlaster
(translate -100 50 300))
(add cube redPlaster
(translate 100 50 450))
(add cube bluePlaster
(translate -100 50 450))
)
(tell camera
(pos '(0 400 -500))
(coi '(0 0 200))
(shoot)
(orthographic)
(shoot)
)
; create an isometric camera that will provide four (hopefully)
; useful views of our scene
(object isoCamera IsometricCamera)
; take some pictures
(tell isoCamera
(shoot) ; this one will be orthographic -- the default
; for isometric cameras
(perspective) ; switch to perspective view
(shoot)
)