Saturday, February 14, 2009

IndexedLineSet demo - drawing Cartesian axes

Here are the three Cartesian axes, each perpendicular to the other two:
#VRML V2.0 utf8

Shape {
  appearance Appearance {
    material Material {
      emissiveColor 1 1 1
    }
  }

  geometry IndexedLineSet {
    coord Coordinate {
      point [
        -1 0 0, 1 0 0, 0 0 1,
        0 0 -1, 0 -1 0, 0 1 0
      ]
    }

    coordIndex [ 0 1 -1 2 3 -1 4 5 ]
  }
}

No comments: