next up previous contents
Next: 3 Aplikativne naloge Up: 2 Programiranje Previous: 2.7 Grafika v Windows

2.8 VRML

VRML jezik za opis prostorskih objektov je ASCII datoteka, ki jo lahko gledamo v brskalniku ali samostojnem predvajalniku. Primeren program na okolju Windows je Cosmo Player, ki se dobi brezplacno na WWW strezniku Silicon Graphics. Izdelati je potrebno primer datoteke lecad.wrld z 3D modelom crk napisa LECAD in uporabo osnovnih primitivov. Porocilo naj vsebuje tudi kratek opis jezika VRML. Navodila in opis jezika obstaja tudi na strezniku laboratorija LECAD

#VRML V2.0 utf8
Transform {
  children [

    DirectionalLight {        # First child
        direction 0 0 -1      # Light illuminating the scene
    }

    Transform {               # Second child - a red sphere
      translation 3 0 1
      children [
        Shape {
          geometry Sphere { radius 2.3 }
          appearance Appearance
             material Material { diffuseColor 1 0 0 }   # Red
        }
      ]
    }

    Transform {               # Third child - a blue box 
      translation -2.4 .2 1
      rotation     0 1 1  .9
      children [
        Shape {
          geometry Box {}
          appearance Appearance
             material Material { diffuseColor 0 0 1 }  # Blue
        }
      ]
    }

  ] # end of children for world
}



Leon Kos
Tue Mar 24 18:24:32 CET 1998