Understanding Scene Graphs 
by Aaron E. Walsh

Listing One
#VRML V2.0 utf8
Group {
 children [ 
  Shape {
   geometry Sphere {} 
   appearance Appearance {material Material{}}
  }
  DEF TOUCH TouchSensor { }    # define sensor 
  DEF LIGHT DirectionalLight { # define light 
    color 1 1 0   # R G B             
    on FALSE      # start with light off
  } ]
ROUTE TOUCH.isOver TO LIGHT.set_on
}


Listing Two
Group {
  children [
    Background2D {
      backColor 0.4 0.4 0.4
      url []
    }
    Transform2D {
      children [
        Transform2D {
          children [
            DEF ID0 Shape {
              appearance Appearance {
                material Material2D {
                  emissiveColor 0.6 0.6 0.6
                  filled TRUE
                  transparency 0.0
                }}
              geometry Rectangle {size 20.0 20.0}
            }
          ]
          center 0.0 0.0
          rotationAngle 0.0
          scale 1.0 1.0
          scaleOrientation 0.0
          translation 0.0 204.0
        }





1


