IceCreamCones

From MHCGraphics

Jump to: navigation, search
; Example Mead program to draw ice cream cones
;
; demonstrates simple object groupings
;
; Jim Teresco, 2/5/2008
; Mount Holyoke College
; Computer Science 110
;
; $Id: IceCreamCones.scm 460 2008-02-07 02:47:22Z terescoj $
;
(require (lib "Defs.ss" "Mead"))

; define a group for an ice cream cone.  The cone is always
; yellow, the ice cream scoop takes on a color when the object
; is added to another group or the scene
(object iceCreamCone Group
        (add cone yellowPlaster
             (xform
              (scale .2 .5 .2)
              (xRot 180)
              )
         )
        (add sphere
             (xform
              (scale .22 .22 .22)
              (translate 0 30 0)
              )
        )
        (add sphere
             (xform
              (scale .2 .2 .2)
              (translate 0 40 0)
              )
        )
)

; let's put in a few ice cream cones of different flavors
(tell scene 
      (add iceCreamCone whitePlaster
           (translate -50 0 0)
      )
      (add iceCreamCone greenPlaster
           (translate 50 0 0)
      )
      (add iceCreamCone ltGrayPlaster
           (scale .75 .75 .75)
      )
)            

(tell camera (shoot))
Personal tools