Exercises Chapter 16

1(a) Calculate the bounding boxes of each Node in the following piece of VRML (refer to Appendix A).

#VRML V2.0 utf8

Group {
  children [
    Transform {
      translation 1 1 1
      children [
        DEF GEO1 Shape {
          geometry DEF SPH Sphere {
            radius 1
          }
        }
      ]
    }
    Transform {
      translation 3 3 1
      children [
        DEF GEO2 Shape {
          geometry USE SPH
        }
      ]
    }
  ]
}
Transform {
  scale 4 4 4
  children [
    Transform {
      translation 3 1 2
      children [
        DEF GEO3 Shape {
          geometry USE SPH
        }
      ]
    } 
    Transform {
      translation 1 3 2
      children [
        DEF GEO4 Shape {
          geometry USE SPH
        }
      ]
    } 
  ] 
}


1(b) order to speed up the ray-tracing, the objects GEO1, GEO2, GEO3 and GEO4 are to be stored in an octree. The root cell of the octree has corners (0, 0, 0) and (16, 16, 16). What is the structure of the octree and what are the values in the octree cells after subdivision if the subdivision terminates when each cell contains a unique object?


Back to: Index of Exercises
Back to: Chapter 16

Last modified: Sun Jul 20 20:40:44 BST 2003