ConeLight

From MHCGraphics

Jump to: navigation, search
; Mead example file -- an uncapped cone with a bulb
;
; Jim Teresco
; Computer Science 110
; Mount Holyoke College
; February 29, 2008
;
; $Id: ConeLight.scm 522 2008-03-03 03:40:53Z terescoj $
;
(require (lib "Defs.ss" "Mead"))

; remove the default light bulb
(object scene Group)

; create a cone object that has no cap on the wide end
(object uncappedCone Cone
        (capped #f))

; construct a simple scene with an uncapped cone, a light at
; the origin, and a white sphere that will be illuminated
; by this light
(tell scene
      (add bulb) ; at the origin by default
      (add uncappedCone redPlaster)
      (add sphere whitePlaster (translate 0 -200 0))
      )

(tell image (background black))
; take a picture from below, so we can see a bit of the inside
; of the uncapped cone
(tell camera 
      (pos '(0 -200 -500))
      (shoot))
Personal tools