Spotlights

From MHCGraphics

Jump to: navigation, search
; Mead example file -- a couple of simple spotlights
;
; Jim Teresco
; Computer Science 110
; Mount Holyoke College
; March 2, 2008
;
; $Id: Spotlights.scm 522 2008-03-03 03:40:53Z terescoj $
;
(require (lib "Defs.ss" "Mead"))

; no default light
(object scene Group)

; create a big white plaster wall on which our spotlights will
; shine

(object wall Plane
        (material whitePlaster)
        (xRot 90)
        )

(tell scene
      (add wall)
      )

; now for some spotlights
; one with a sharp spot, no falloff at all
(object sharpSpot Spotlight
        (pos '(-100 100 -300))
        (coi '(-100 100 0))
        (radius 10)
        (falloff 0)
        )

; now a brighter one but with more of a falloff
(object fuzzySpot Spotlight
        (pos '(-100 -100 -300))
        (coi '(-100 -100 0))
        (intensity .8)
        (radius 10)
        (falloff 10)
        )

; and some colored and somewhat fuzzy spotlights
(object redSpot Spotlight
        (pos '(100 0 -300))
        (coi '(100 0 0))
        (color red)
        (radius 7.5)
        (falloff 1)
        )
(object greenSpot Spotlight
        (pos '(137 -25 -300))
        (coi '(137 -25 0))
        (color green)
        (radius 7.5)
        (falloff 1)
        )
(object blueSpot Spotlight
        (pos '(137 25 -300))
        (coi '(137 25 0))
        (color blue)
        (radius 7.5)
        (falloff 1)
        )

(tell scene
      (add sharpSpot)
      (add fuzzySpot)
      (add redSpot)
      (add greenSpot)
      (add blueSpot)
      )

(tell camera
      (shoot))
Personal tools