Octaedru

30

#VRML V2.0 utf8

Transform {
  children [
#Octaedrul cu linii
    Shape {
      appearance Appearance {
        material Material {
          emissiveColor 0 1 1 #here you specify the lines' color
        }
     }
    geometry IndexedLineSet {
      coord DEF Octaedru Coordinate {
        point [ 0 1 0 
                0 0 1
                1 0 0
                0 0 -1
                -1 0 0
                0 -1 0

        ]
    }
    coordIndex [
        0 1 2 0 3 2 5 1 4 3 5 4 0 -1
    ]
  }
}
#Octaedrul cu fete
Transform {
  scale 0.8 0.8 0.8
  children [
    Shape {
      appearance Appearance {
        material Material {
        emissiveColor 0 0 1
        diffuseColor 1 0 0
        ambientIntensity 0.9 
        }
      }
    geometry IndexedFaceSet {
      coord USE Octaedru
      coordIndex [
        0 1 2 -1
        0 2 3 -1
        0 3 4 -1
        0 4 1 -1
        5 2 1 -1
        5 3 2 -1
        5 4 3 -1
        5 1 4 -1
      ]
    }
  }
 ]
}
Shape {
appearance Appearance {
material Material {
diffuseColor 0 1 1
transparency 0.4
}
}
geometry Sphere {radius 1}
}
]
}
PROTO Varf [
  field SFVec3f tra 0 0 0
  field MFString str ""
]
{
Transform {
  translation IS tra
  children [
    Billboard {
      axisOfRotation 0 0 0
      children [
        Shape {
          appearance DEF Galben Appearance {
            material Material {
              diffuseColor 1 1 0
            }
          }
          geometry Text {
            fontStyle FontStyle {
              family "Times New Roman"
              size 0.4
              justify "center"
            }
            string IS str
          }
        }
      ]
    }
  ]
}
}

Varf {
tra 0 1.2 0
str "0"

Varf {
tra 0 0 1.2
str "1"
}
Varf {
tra 1.2 0 0
str "2"
}
Varf {
tra 0 0 -1.2
str "3"
}
Varf {
tra -1.2 0 0
str "4"
}
Varf {
tra 0 -1.2 0
str "5"
}

© Cornel Mironel Niculae, 2003-2004

13-Nov-2009