Documente Academic
Documente Profesional
Documente Cultură
1. Noţiuni introductive
VRML (Virtual Reality Modeling Language) a devenit de fapt standardul pentru descrierea
obiectelor şi scenelor tridimensionale pe World Wide Web. Tehnologia VRML are foarte multe aplicatii,
incluzând divertisment pe WEB, vizualizare distribuită, interfeţe 3-D, medii de lucru 3-D, simulări
interactive pentru educaţie, muzee virtuale şi multe altele. VRML este tehnologia cheie pentru viitorul
webului.
Scopul acestui laborator este învăţarea utilizării VRML ’97, crearea propriilor lumi virtuale tridimensionale.
Vor fi prezentate conceptele şi terminologia acestui limbaj precum şi sintaxa acestuia. De asemenea vor fi
prezentate tehnici de creştere a performanţelor şi realismului. Sunt prezentate numeroase exemple legate de
noţiunile prezentate.
VRML este:
- un fişier de format text
- un limbaj folosit în descrierea figurilor 3-D şi a mediilor de lucru interactive;
- un standard web.
Fişierele VRML pot fi scrise în orice editor şi salvate cu extensia wrl şi pot fi vizualizate folosind
un browser VRML . Fişierele VRML conţin următoarele elemente:
- antetul fişierului;
- comentarii;
- noduri;
- câmpuri;
- valori;
- nume de noduri necesare pentru reutilizarea unor noduri.
Un exemplu simplu de program VRML care realizează un cilindru este următorul:
#VRML V2.0 utf8
# Cilindru
Shape {
appearance Appearance {
material Material { }
}
geometry Cylinder {
height 2.0
radius 1.5
}
Primul rând din acest program este antetul fişierului care specifică versiunea utilizată şi tipul codificării
utilizate. Al doilea rând este un comentariu iar programul propriu-zis începe din linia a treia,.
Fişierele VRML conţin noduri, câmpuri, valori, etc. ce descriu o lume tridimensională. Nodurile de
tip figură (Shape) descriu geometria (forma sau structura obiectelor) şi aspectul exterior al lor (culoare şi
textură).
Shape {
geometry . . .
appearance . . .
}
Figurile sunt blocurile din care este construită lumea VRML. Figurile primitive sunt blocurile
standard: paralelipipedul (Box), conul (Cone), cilindrul (Cylinder) şi sfera (Sphere).
Geometria figurilor este construită cu ajutorul nodurilor din câmpul geometry, care cuprind
următoarele noduri de bază:
Box { . . . }
1
Cone { . . . }
Cylinder { . . . }
Sphere { . . . }
Dimensiunile nodurile sunt controlate cu ajutorul câmpurilor. Pentru nodul box, dimensiunile acestuia
sunt controlate de câmpul size L l i , unde L – este lungimea, l – lăţimea, iar i – înălţimea
paralelipipedului.
Box {
size 2.0 0.5 3.0
}
Dimensiunile sunt exprimate de obicei în metri, dar ele pot fi orice.
Nodul de tip con are structura următoare:
Cone {
height 3.0
bottomRadius 0.75
}
unde height reprezintă înălţimea conului iar bottomRadius raza bazei.
Nodul de tip cilindru are structura următoare:
Cylinder {
height 2.0
radius 1.5
}
unde height reprezintă înălţimea cilindrului iar radius raza acesuia.
Nodul de tip sferă are structura următoare:
Sphere {
radius 1.0
}
unde radius este raza sferei.
Nodurile pot fi denumite şi folosite în continuare în program utilizând instrucţiunile DEF şi USE:
DEF Cilindru_nou Shape {
appearance Appearance {
material Material { }
}
geometry Cylinder {
height 2.0
radius 1.5
}
}
. . .
USE Cilindru_nou
. . .
USE Cilindru_nou
Culoarea şi textura unui bloc este controlată cu ajutorul unui nod denumit Appearance ce are
structura următoare:
Appearance {
material . . .
texture . . .
textureTransform . . .
}
Câmpul material poate conţine un nod denumit Material ce are următoarele câmpuri
Material {
exposedField SFFloat ambientIntensity 0.2 # [0,1]
exposedField SFColor diffuseColor 0.8 0.8 0.8 # [0,1]
exposedField SFColor emissiveColor 0 0 0 # [0,1]
exposedField SFFloat shininess 0.2 # [0,1]
2
exposedField SFColor specularColor 0 0 0 # [0,1]
exposedField SFFloat transparency 0 # [0,1]
}
Nodul Material specifică proprietăţile materialului de la suprafaţa nodurilor geometrice. Toate câmpurile
din acest nod pot lua valori între 0 şi 1. Aceste câmpuri determină modul în care lumina este reflectată de pe
obiect pentru a crea culoarea acestuia:
a. Câmpul ambientIntensity câtă lumină va fi reflecatată de suprafaţa obiectului. Lumina ambientului
este omnidirecţională şi depinde doar de numărul de surse de lumină. Culoarea ambientului este calculată
după formula ambientIntensity × diffuseColor.
b. Câmpul diffuseColor reflectă toate sursele de lumină în funcţie de unghiul pe care suprafaţa
obiectului o face cu raza de lumină. Cu cât raza de lumină va cădea mai perpendicular pe suprafaţa
obiectului, cu atât mai multă lumină va reflecta.
c. Câmpul emissiveColor modelează “încălzirea” obiectelor.
d. Câmpurile specularColor şi shininess subliniază strălucirea şi dimensiunile obiectelor.
e. Câmpul transparency specifică transparenţa unui obiect, pentru valoarea 1 acesta fiind complet
transparent, iar pentru valoarea 0 complet opac.
]
}
Diferitele nuanţe ale culorilor pot fi obţinute prin combinarea nuanţelor de bază Red, Green, Blue cu
valorile dorite în domeniul 0..1.
Tabelul de mai jos conţine câteva exemple de combinaţii între culorile de bază, efectul fiind cele cinci
culori specificate:
5
Culoarea Red Green Blue Nuanţa obţinută
Alb 1.0 1.0 1.0
Roşu 1.0 0.0 0.0
Galben 1.0 1.0 0.0
Turcoaz 0.0 1.0 1.0
Maron 0.5 0.2 0.0
Prin aplicarea câmpurilor specifice nodului Materials pot fi obţinute efecte de strălucire a obiectelor.
Câteva exemple sunt prezentate în tabelul următor:
Gri metalizat 0.30 0.30 0.30 0.50 0.70 0.70 0.80 0.10
Aramiu 0.26 0.30 0.11 0.00 0.75 0.33 0.00 0.08
Auriu 0.40 0.22 0.15 0.00 0.71 0.70 0.56 0.16
Mov metalizat 0.17 0.10 0.03 0.22 0.64 0.00 0.98 0.20
Rosu metalizat 0.15 0.27 0.00 0.00 0.61 0.13 0.18 0.20
Albastru stralucitor 0.10 0.20 0.20 0.71 0.83 0.83 0.83 0.12
# Gri metalizat
Transform {
translation -2.0 1.0 0.0
children [
Shape {
appearance Appearance {
material Material {
ambientIntensity 0.3
diffuseColor 0.3 0.3 0.5
specularColor 0.7 0.7 0.8
shininess 0.1
}
}
geometry Sphere { }
}
]
}
# Aramiu
Transform {
translation 0.0 3.0 1.0
children [
Shape {
appearance Appearance {
material Material {
ambientIntensity 0.26
diffuseColor 0.3 0.11 0.0
6
specularColor 0.75 0.33 0.0
shininess 0.08
}
}
geometry Sphere { }
}
]
}
# Auriu
Transform {
translation 2.0 1.0 0.0
children [
Shape {
appearance Appearance {
material Material {
ambientIntensity 0.4
diffuseColor 0.2 0.15 0.0 {0.7 0.7 0.0- vezi efectul}
specularColor 0.71 0.7 0.56
shininess 0.16
}
}
geometry Sphere { }
}
]
}
# Mov metalizat
Transform {
translation -4.0 -2.0 0.0
children [
Shape {
appearance Appearance {
material Material {
ambientIntensity 0.17
diffuseColor 0.1 0.03 0.22
specularColor 0.64 0.0 0.98
shininess 0.2
}
}
geometry Sphere { }
}
]
}
# Rosu metalizat
Transform {
translation 0.0 -2.0 0.0
children [
Shape {
7
appearance Appearance {
material Material {
ambientIntensity 0.15
diffuseColor 0.27 0.0 0.0
specularColor 0.61 0.13 0.18
shininess 0.2
}
}
geometry Sphere { }
}
]
}
# Albastru stralucitor
Transform {
translation 4.0 -2.0 0.0
children [
Shape {
appearance Appearance {
material Material {
ambientIntensity 0.1
diffuseColor 0.20 0.2 0.71
specularColor 0.83 0.83 0.83
shininess 0.12
}
}
geometry Sphere { }
}
]
}
Un nod de tipul Group conţine noduri “copiii” fără a introduce noi transformări de coordonate.
Nodurile de tip Group grupează mai multe blocuri într-o singură figură, acestea fiind conţinute de o listă
numită children.
#VRML V2.0 utf8
Group {
children [
Shape { . . . },
Shape { . . . },
. . .
]
}
Un exemplu de astfel de figură este dat de următorul program:
8
}
geometry Box {
size 10.0 10.0 10.0
}
},
Shape {
appearance USE White
geometry Sphere {
radius 7.0
}
},
Shape {
appearance USE White
geometry Cylinder {
radius 12.5
height 0.5
}
},
Shape {
appearance USE White
geometry Cylinder {
radius 4.0
height 20.0
}
},
Shape {
appearance USE White
geometry Cylinder {
radius 3.0
height 30.0
}
},
Shape {
appearance USE White
geometry Cylinder {
radius 1.0
height 60.0
}
}
]
}
Modul de lucru:
9
LUCRAREA NR. 2
Transformări de coordonate
Scalarea, rotirea şi translaţia pot fi realizate foarte uşor în VRML. Translaţia şi scalarea sunt
reprezentate prin vectori, iar rotaţia prin unghiul pe care obiectul îl face cu axele de coordonate. Unitatea
de măsură folosită pentru unghiuri este radianul. Nodul care realizează aceste transformări în VRML
este nodul Transform care are sintaxa următoare:
Transform {
eventIn MFNode addChildren
eventIn MFNode removeChildren
exposedField SFVec3f center 0 0 0
exposedField MFNode children []
exposedField SFRotation rotation 0 0 1 0
exposedField SFVec3f scale 1 1 1
exposedField SFRotation scaleOrientation 0 0 1 0
exposedField SFVec3f translation 0 0 0
field SFVec3f bboxCenter 0 0 0
field SFVec3f bboxSize -1 -1 -1
}
Nodul Transform este un nod pentru grupare ce defineşte un sistem de coordonate pentru copiii
săi relativ la sistemele de coordonate ale părinţilor. Câmpurile addChildren şi removeChildren sunt
folosite pentru adăugarea, respectiv ştergerea unui nod din ierarhie.
Câmpul center specifică poziţia originii sistemului de coordonate faţă de originea sistemului
părinte. Rotation reprezintă rotaţia sistemului de coordonate, scale specifică o scalare neuniformă a
sistemului de coordonate, care trebuie să fie pozitivă. Câmpul scaleOrientation specifică o rotaţie a
sistemului de coordonate înainte ca acesta să fie scalat, iar câmpul translation specifică translaţia
sistemului de coordonate. Câmpurile bboxCenter şi bboxSize specifică un paralelipiped ce include copiii
nodului Transform. Valoarea implicită pentru bboxSize este (-1,-1,-1) ceea ce înseamnă că
paralelipipedul nu este definit, şi trebuie calculat de browser.
Fiind dat într-un sistem tridimensional un punct P , acesta poate fi transformat într-un punct P’
în sistemul părinte printr-o serie de transformări intermediare. Notând matricile de transformare cu C
(center), SR (scaleOrientation), T (translation), R (rotation), and S (scale) obţinem următoarea relaţie:
P' = T × C × R × SR × S × -SR × -C × P
pentru următoarea transformare:
Transform {
center C
rotation R
scale S
scaleOrientation SR
translation T
children [...]
}
Următoarele exemple ilustrează modul de lucru al nodului Transform:
a. #VRML V2.0 utf8
DEF T1 Transform { # Părintele întregii scene grafice
translation 0 0 -100 # Translatare de-a lungul axei Z
scale 1 2 1 # Scalare de-a lungul axei Y
children [
DEF T2 Transform {
children Shape {
geometry Box {}
appearance Appearance {
10
material Material { diffuseColor 1 0 0 }
}}}
DEF T3 Transform { # Mutare a centrului şi rotire
center -3 0 0
rotation 0 0 1 3.14
children Shape {
geometry Cone {}
appearance Appearance {
material Material { diffuseColor 0 1 0 }
}}}
DEF T4 Transform { # Scalare
scale 0.5 0.5 0.5
translation 3 0 0
children Shape {
geometry Cylinder {}
appearance Appearance {
material Material { diffuseColor 0 0 1 }
}}}
]
}
# Coloanele
Transform {
translation -2.0 -1.0 0.0 # Translatare pe axele X,Y
children [
DEF Coloana Shape {
appearance DEF Red Appearance {
material Material {diffuseColor 1 0.5 0.5 }
}
geometry Cylinder {
radius 0.4
height 6.0
top FALSE
}
}
]
}
Transform {
translation 2.0 -1.0 0.0
children [ USE Coloana ]
}
# Antablament
Transform {
translation 0.0 2.05 0.0
rotation 0 0 1.0 1.57
children [
Shape {
appearance USE Red
geometry Cylinder { radius 0.4 height 6 }
}
]
}
# Fronton
Transform {
translation -1.55 3.0 0.0
rotation 0.0 0.0 1.0 0.524
children [
DEF Antabl Shape {
appearance USE Red
11
geometry Box { size 4 0.7 0.7 }
}
]
}
Transform {
translation 1.55 3.0 0.0
rotation 0.0 0.0 1.0 -0.524
children [ USE Antabl ]
}
Un alt nod utilizat în gruparea şi modificarea coordonatelor este nodul Billboard care are următoarea
sintaxă:
Billboard {
eventIn MFNode addChildren
eventIn MFNode removeChildren
exposedField SFVec3f axisOfRotation 0 1 0
exposedField MFNode children []
field SFVec3f bboxCenter 0 0 0
field SFVec3f bboxSize -1 -1 -1
}
Nodul Billboard este un nod de grupare a obiectelor care modifică sistemul de coordonate astfel încât axa Z
este îndreptată tot timpul spre privitor.
Câmpul axisOfRotation specifică în jurul cărei axe este realizată rotaţia. Programul următor prezintă un
robot al cărui cap este realizat cu nodul Billboard. Se va observa că la rotirea robotului capul acestuia va
fi orientat tot timpul către privitor.
12
height 0.65
radius 0.04 } },
] },
Transform {
rotation 0.0 1.0 0.0 1.57
children [ USE Rod ] },
Transform {
rotation 0.0 1.0 0.0 3.14
children [ USE Rod ] },
Transform {
rotation 0.0 1.0 0.0 -1.57
children [ USE Rod ] },
Transform {
translation 0.0 0.85 0.0
children [
Shape {
appearance USE RobotColor
geometry Cylinder {
height 0.1
radius 0.8 } }, ] },
Transform {
translation 0.0 0.95 0.0
children [
Shape {
appearance USE RobotColor
geometry Cylinder {
height 0.1
radius 0.2 } }, ] },
Transform {
translation 0.0 1.4 0.0
children [
Billboard { # Capul robotului
axisOfRotation 0.0 1.0 0.0
children [
Shape {
appearance USE RobotColor
geometry Sphere {
radius 0.5 } },
Transform {
translation 0.0 0.25 0.35
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.2 0.2 0.2 } }
geometry Box {
size 0.6 0.05 0 } } ] },
Transform {
translation 0.1 0.15 0.38
children [
DEF Eye Shape {
appearance Appearance {
material Material {
diffuseColor 0.4 1.0 0.0
emissiveColor 0.6 0.0 0.0 } }
geometry Sphere {
radius 0.09 } } ] },
Transform {
translation -0.1 0.15 0.38
children [ USE Eye ] },
Transform {
translation 0.85 0.1 0.0
13
children [
Transform {
translation -0.2 0.0 0.0
rotation 0.0 0.0 1.0 1.57
children [
DEF AntenaeBar Shape {
appearance USE RobotColor
geometry Cylinder {
height 0.4
radius 0.04 } } ] },
Shape {
appearance USE RobotColor
geometry Sphere {
radius 0.09 } },
Transform {
translation 0.0 0.58 0.0
children [
Shape {
appearance USE RobotGlow
geometry Cone {
height 1.0
bottomRadius 0.02 } } ] }, ] },
Transform {
translation -0.85 0.1 0.0
children [
Transform {
translation 0.2 0.0 0.0
rotation 0.0 0.0 1.0 -1.57
children [ USE AntenaeBar ]
},
Transform {
rotation 0.0 0.0 1.0 0.785
children [
Shape {
appearance USE RobotColor
geometry Box {
size 0.2 0.2 0.2 } },
Transform {
translation 0.0 0.58 0.0
children [
Shape {
appearance USE RobotGlow
geometry Box {
size 0.02 1.0 0.02 } } ] },
Transform {
translation 0.0 0.95 0.0
children [
Shape {
appearance USE RobotGlow
geometry Box {
size 0.2 0.02 0.02 } } ] },
Transform {
translation 0.0 0.85 0.0
children [
Shape {
appearance USE RobotGlow
geometry Box {
size 0.4 0.02 0.02 } } ] }, ] }, ] }, ] }, ] },] },
Transform {
translation 0.0 2.0 -6.0
children [
DEF Slab Shape {
14
appearance Appearance {
material Material {
diffuseColor 0.0 0.1 0.5
emissiveColor 0.0 0.3 0.5 } }
geometry Box {
size 2.0 4.0 0.3 } }, ] },
Transform {
translation -6.0 2.0 0.0
children [ USE Slab ] },
Transform {
translation 6.0 2.0 0.0
children [ USE Slab ] },
Transform {
translation -4.3 2.0 -4.3
children [ USE Slab ] },
Transform {
translation 4.3 2.0 -4.3
children [ USE Slab ] }, ]
}
Pentru controlul culorilor este foarte util următorul tabel:
TEMĂ:
15
LUCRAREA NR. 3
Nodul Extrusion
16
Transform {
translation 3 0 0
children Shape {
appearance USE A
geometry DEF BENDY Extrusion {
crossSection [ 1 0, 0 -1, -1 0, 0 1, 1 0 ]
spine [ 0 0 0, 0.5 0.5 0, 0.5 1 0, 0 1.5 0, 0 2 0,
-0.5 2.5 0, -0.5 3 0, 0 3.5 0 ]
scale [ .3 .3, .2 .2, .1 .1, .1 .1, .1 .1, .1 .1, .1 .1,
.3 .3 ]
orientation [ 0 1 0 0.0, 0 1 0 -.3, 0 1 0 -.6, 0 1 0 -.9,
orientation [ 0 1 0 -1.2, 0 1 0 -1.5, 0 1 0 -1.8, 0 1 0 -2.1 ]
creaseAngle 0.9
} } }
Background { skyColor 1 1 1 }
DirectionalLight { direction 0 0 1 }
NavigationInfo { type "EXAMINE" }
]}
Exemplul nr. 2
#VRML V2.0 utf8
Shape {
appearance Appearance {
material Material {
}
}
geometry Extrusion {
crossSection [
1.00 0.00,
0.92 0.38,
0.71 0.71,
0.38 0.92,
0.00 1.00,
-0.38 0.92,
-0.71 0.71,
-0.92 0.38,
-1.00 0.0,
-0.92 -0.38,
-0.71 -0.71,
-0.38 -0.92,
0.00 -1.00,
0.38 -0.92,
0.71 -0.71,
0.92 -0.38,
1.00 0.00
]
spine [
10.0 0.0 0.0,
9.238 0.625 3.826,
7.071 1.25 7.071,
3.826 1.875 9.238,
0.0 2.5 10.0,
17
-3.826 3.125 9.238,
-7.071 3.75 7.071,
-9.238 4.375 3.826,
-10.0 5.0 0.0,
-9.238 5.625 -3.826,
-7.071 6.25 -7.071,
-3.826 6.875 -9.23,
0.0 7.5 -10.0,
3.826 8.125 -9.238,
7.071 8.75 -7.071,
9.238 9.375 -3.826,
10.0 10.0 0.0,
9.238 10.625 3.826,
7.071 11.25 7.0710,
3.826 11.875 9.238,
0.0 12.5 10.0,
-3.826 13.125 9.238,
-7.071 13.75 7.0710,
-9.238 14.375 3.826,
-10.0 15.0 0.0,
-9.238 15.625 -3.826,
-7.071 16.25 -7.071,
-3.826 16.875 -9.238,
0.0 17.5 -10.0,
3.826 18.125 -9.238,
7.071 18.75 -7.071,
9.238 19.375 -3.826,
]
scale [
2.0 2.0,
1.9 1.9,
1.8 1.8,
1.7 1.7,
1.6 1.6,
1.5 1.5,
1.4 1.4,
1.3 1.3,
1.2 1.2,
1.1 1.1,
1.0 1.0,
1.0 1.0,
1.0 1.0,
1.0 1.0,
0.9 0.9,
0.9 0.9,
0.9 0.9,
0.9 0.9,
0.8 0.8,
0.7 0.7,
0.6 0.6,
0.6 0.6,
0.6 0.6,
18
0.6 0.6,
0.6 0.6,
0.6 0.6,
0.5 0.5,
0.4 0.4,
0.3 0.3,
0.2 0.2,
0.5 0.5,
0.8 0.8,
]
orientation [
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
]
beginCap TRUE
endCap TRUE
ccw FALSE
creaseAngle 0.5
convex TRUE
solid TRUE
}
}
19
Nodul IndexedFaceSet
Exemplul nr. 3
20
-0.48 1.5 0.35,
-0.49 1.5 -0.35,
0.18 1.5 -0.57,
0.7 1.2 0,
0.22 1.2 0.67,
-0.57 1.2 0.41,
-0.57 1.2 -0.41,
0.21 1.2 -0.67,
0.4 0 0,
0.12 0 0.38,
-0.32 0 0.24,
-0.32 0 -0.23,
0.12 0 -0.38 ]
}
solid FALSE
creaseAngle 0.5
coordIndex [ 0, 1, 6, 5, -1, 1, 2, 7,
6, -1, 2, 3, 8, 7, -1, 3,
4, 9, 8, -1, 4, 0, 5, 9,
-1, 5, 6, 11, 10, -1, 6, 7,
12, 11, -1, 7, 8, 13, 12, -1,
8, 9, 14, 13, -1, 9, 5, 10,
14, -1, 10, 11, 16, 15, -1, 11,
12, 17, 16, -1, 12, 13, 18, 17,
-1, 13, 14, 19, 18, -1, 14, 10,
15, 19, -1, 15, 16, 21, 20, -1,
16, 17, 22, 21, -1, 17, 18, 23,
22, -1, 18, 19, 24, 23, -1, 19,
15, 20, 24, -1, 20, 21, 26, 25,
-1, 21, 22, 27, 26, -1, 22, 23,
28, 27, -1, 23, 24, 29, 28, -1,
24, 20, 25, 29, -1, 25, 26, 27,
28, 29 ]
}
}
]
}
Exemplul nr. 4
#VRML V2.0 utf8
Viewpoint { description "Initial view" position 0 0 9 }
NavigationInfo { type "EXAMINE" }
Transform {
translation -1.5 0 0
children Shape {
appearance DEF A Appearance { material Material { } }
geometry DEF IFS IndexedFaceSet {
coord Coordinate {
point [
1 1 1, 1 1 -1, 1 -1 1, 1 -1 -1,
-1 1 1, -1 1 -1, -1 -1 1, -1 -1 -1,
.618 1.618 0, -.618 1.618 0, .618 -1.618 0, -.618 -1.618 0,
1.618 0 .618, 1.618 0 -.618, -1.618 0 .618, -1.618 0 -.618,
0 .618 1.618, 0 -.618 1.618, 0 .618 -1.618, 0 -.618 -1.618
] }
21
coordIndex [
1 8 0 12 13 -1, 4 9 5 15 14 -1, 2 10 3 13 12 -1,
7 11 6 14 15 -1, 2 12 0 16 17 -1, 1 13 3 19 18 -1,
4 14 6 17 16 -1, 7 15 5 18 19 -1, 4 16 0 8 9 -1,
2 17 6 11 10 -1, 1 18 5 9 8 -1, 7 19 3 10 11 -1,
]
color Color { # şase culori:
color [ 0 0 1, 0 1 0, 0 1 1, 1 0 0, 1 0 1, 1 1 0 ]
}
colorPerVertex FALSE
colorIndex [ 0, 1, 1, 0, 2, 3, 3, 2, 4, 5, 5, 4 ]
texCoord TextureCoordinate {
point [
0.654508 0.0244717, 0.0954915 0.206107
0.0954915 0.793893, 0.654508 0.975528, 1 0.5,
] }
texCoordIndex [
0 1 2 3 4 -1, 2 3 4 0 1 -1, 4 0 1 2 3 -1, 1 2 3 4 0 -1,
2 3 4 0 1 -1, 0 1 2 3 4 -1, 1 2 3 4 0 -1, 4 0 1 2 3 -1,
4 0 1 2 3 -1, 1 2 3 4 0 -1, 0 1 2 3 4 -1, 2 3 4 0 1 -1,
] } } }
Transform {
translation 1.5 -1.5 0
children Shape {
appearance USE A
geometry IndexedFaceSet {
coord Coordinate {
point [
1 1 1, 1 -1 -1, -1 1 -1, -1 -1 1,
]
}
coordIndex [
3 2 1 -1, 2 3 0 -1, 1 0 3 -1, 0 1 2 -1,
]
color Color {
color [ 0 1 0, 1 1 1, 0 0 1, 1 0 0 ]
} } } }
Transform {
translation 1.5 1.5 0
children Shape {
appearance Appearance {
texture ImageTexture { url "Pentagon.gif" }
material Material { }
}
geometry USE IFS } }
Exemplul nr.5.
Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 0.5 0.0
}
}
geometry Extrusion {
creaseAngle 0.785
crossSection [
22
# Square
-1.0 1.0, 1.0 1.0,
1.0 -1.0, -1.0 -1.0,
-1.0 1.0
]
spine [
# Straight-line
0.0 0.0 0.0,
0.0 0.5 0.0,
0.0 1.0 0.0,
0.0 1.5 0.0,
0.0 2.0 0.0,
0.0 2.5 0.0,
0.0 3.0 0.0,
0.0 3.5 0.0,
0.0 4.0 0.0
]
orientation [
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.175,
0.0 1.0 0.0 0.349,
0.0 1.0 0.0 0.524,
0.0 1.0 0.0 0.698,
0.0 1.0 0.0 0.873,
0.0 1.0 0.0 1.047,
0.0 1.0 0.0 1.222,
0.0 1.0 0.0 1.396,
]
}
}
Exemplul nr.6.
Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 0.0
}
}
geometry IndexedFaceSet {
coord Coordinate {
point [
# Lighting bolt tip
0.0 0.0 0.0,
# Front perimeter
5.5 5.0 0.88,
4.0 5.5 0.968,
7.0 8.0 1.408,
4.0 9.0 1.584,
1.0 5.0 0.88,
2.5 4.5 0.792,
# Back perimeter
5.5 5.0 -0.88,
4.0 5.5 -0.968,
7.0 8.0 -1.408,
4.0 9.0 -1.584,
23
1.0 5.0 -0.88,
2.5 4.5 -0.792,
]
}
coordIndex [
# Front
0, 1, 2, 3, 4, 5, 6, -1,
# Back
0, 12, 11, 10, 9, 8, 7, -1,
# Sides
0, 7, 1, -1,
1, 7, 8, 2, -1,
2, 8, 9, 3, -1,
3, 9, 10, 4, -1,
4, 10, 11, 5, -1,
5, 11, 12, 6, -1,
6, 12, 0, -1,
]
creaseAngle 0.0
convex FALSE
solid TRUE
colorPerVertex TRUE
ccw TRUE
}
}
Exemplul nr.7.
#VRML V2.0 utf8
# Spirala
Viewpoint {
position 0.0 1.5 11.0
description "Entry view"
}
Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 0.7
}
}
geometry Extrusion {
creaseAngle 1.57
endCap FALSE
beginCap FALSE
solid FALSE
crossSection [
# Semicerc
-1.00 0.00, -0.92 -0.38,
-0.71 -0.71, -0.38 -0.92,
0.00 -1.00, 0.38 -0.92,
0.71 -0.71, 0.92 -0.38,
1.00 0.00,
]
spine [
# Spirala
2.00 0.00 -0.00, 1.85 0.12 -0.77,
1.41 0.24 -1.41, 0.77 0.36 -1.85,
0.00 0.48 -2.00, -0.77 0.61 -1.85,
-1.41 0.73 -1.41, -1.85 0.85 -0.77,
-2.00 0.97 0.00, -1.85 1.09 0.77,
-1.41 1.21 1.41, -0.77 1.33 1.85,
24
0.00 1.45 2.00, 0.77 1.58 1.85,
1.41 1.70 1.41, 1.85 1.82 0.77,
2.00 1.94 0.00, 1.85 2.06 -0.77,
1.41 2.18 -1.41, 0.77 2.30 -1.85,
0.00 2.42 -2.00, -0.77 2.55 -1.85,
-1.41 2.67 -1.41, -1.85 2.79 -0.77,
-2.00 2.91 0.00, -1.85 3.03 0.77,
-1.41 3.15 1.41, -0.77 3.27 1.85,
0.00 3.39 2.00, 0.77 3.52 1.85,
1.41 3.64 1.41, 1.85 3.76 0.77,
2.00 3.88 0.00,
]
}
}
Tema:
Construiti o naveta spatiala, utilizand nodurile si efectele studiate.
25
LUCRAREA NR. 4
Nodul Inline
Are următoarea sintaxă:
Inline {
exposedField MFString url []
field SFVec3f bboxCenter 0 0 0 # (-inf,inf)
field SFVec3f bboxSize -1 -1 -1 # (0,inf) or -1,-1,-1
}
Nodul Inline este un nod de grupare care citeşte nodurile copii de la o anumită locaţie specificată de câmpul
url.
Observaţie: Deoarece nodul Inline este un nod de grupare fişierul spre care pointează nu trebuie să conţină
un fragment dintr-o scenă grafică. Spre exemplu, următorul fragment de program este ilegal:
Shape {
appearance Appearance {
# Linia următoare este ILEGALĂ;
material Inline { url "http://..." }
}
geometry Box { }
}
Următoarele exemple prezintă utilizarea nodului Inline.
Programul următor se va salva în fişierul chair.wrl:
#VRML V2.0 utf8
Group {
children [
Transform {
translation 0.0 0.5 0.0
children [
Shape {
appearance DEF Brown Appearance {
material Material {
diffuseColor 0.6 0.35 0.0
}
}
geometry Box {
size 0.39 0.03 0.41
} }, ] },
# Picioarele scaunului
Transform {
translation 0.1575 0.2485 0.1575
children [
DEF Leg Shape {
appearance USE Brown
geometry Box {
size 0.03 0.497 0.03
} }, ] },
Transform {
translation -0.1575 0.2485 0.1575
children [ USE Leg ]
},
Transform {
translation -0.1575 0.2485 -0.1575
children [ USE Leg ]
},
Transform {
26
translation 0.1575 0.2485 -0.1575
children [ USE Leg ]
},
# Spatarul scaunului
Transform {
translation 0.1875 0.5 0.0
rotation 0.0 0.0 1.0 -0.17
children [
Transform {
translation 0.0 0.54 0.0
children [
Shape {
appearance USE Brown
geometry Box {
size 0.06 0.17 0.43
} }, ] },
Transform {
translation 0.0 0.2275 0.0
children [
DEF BackPole Shape {
appearance USE Brown
geometry Box {
size 0.02 0.455 0.02
} }, ] },
Transform {
translation 0.0 0.2275 -0.083
children [ USE BackPole ]
},
Transform {
translation 0.0 0.2275 0.083
children [ USE BackPole ]
},
Transform {
translation 0.0 0.2275 -0.166
children [ USE BackPole ]
},
Transform {
translation 0.0 0.2275 0.166
children [ USE BackPole ]
}, ] }, ] }
Programul următor se va salva în fişierul table.wrl:
#VRML V2.0 utf8
Group {
children [
Transform {
translation 0.0 0.615 0.0
children [
Shape {
appearance DEF Brown Appearance {
material Material {
diffuseColor 0.6 0.35 0.0
}
}
geometry Cylinder {
radius 0.7
height 0.03
} }, ] },
# piciorul mesei
27
Transform {
translation 0.0 0.3075 0.0
children [
Shape {
appearance USE Brown
geometry Box {
size 0.09 0.57 0.09
} }, ] },
Transform {
translation 0.0 0.015 0.0
children [
Shape {
appearance USE Brown
geometry Box {
size 0.5 0.03 0.5
} }, ] },
Transform {
translation 0.0 0.045 0.0
children [
Shape {
appearance USE Brown
geometry Box {
size 0.35 0.03 0.35
} }, ] }, ] }
Programul următor apelează cele două fişiere anterioare folosind un nod Inline:
#VRML V2.0 utf8
Group {
children [
Inline { url "table.wrl" },
Transform {
translation 0.95 0.0 0.0
children DEF Chair Inline { url "chair.wrl" }
},
Transform {
translation -0.95 0.0 0.0
rotation 0.0 1.0 0.0 3.14
children USE Chair
},
Transform {
translation 0.0 0.0 0.95
rotation 0.0 1.0 0.0 -1.57
children USE Chair
},
Transform {
translation 0.0 0.0 -0.95
rotation 0.0 1.0 0.0 1.57
children USE Chair
}, ] }
}
Inline { url "Munte colorat.wrl" }
# Spirala
Viewpoint {
position 0.0 1.5 11.0
description "Entry view"
}
NavigationInfo {
type [ "EXAMINE", "ANY" ]
headlight TRUE
}
Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 0.7
}
}
geometry Extrusion {
creaseAngle 1.57
endCap FALSE
beginCap FALSE
solid FALSE
crossSection [
# Semicerc
-1.00 0.00, -0.92 -0.38,
-0.71 -0.71, -0.38 -0.92,
0.00 -1.00, 0.38 -0.92,
0.71 -0.71, 0.92 -0.38,
29
1.00 0.00,
]
spine [
# Spirala
2.00 0.00 -0.00, 1.85 0.12 -0.77,
1.41 0.24 -1.41, 0.77 0.36 -1.85,
0.00 0.48 -2.00, -0.77 0.61 -1.85,
-1.41 0.73 -1.41, -1.85 0.85 -0.77,
-2.00 0.97 0.00, -1.85 1.09 0.77,
-1.41 1.21 1.41, -0.77 1.33 1.85,
0.00 1.45 2.00, 0.77 1.58 1.85,
1.41 1.70 1.41, 1.85 1.82 0.77,
2.00 1.94 0.00, 1.85 2.06 -0.77,
1.41 2.18 -1.41, 0.77 2.30 -1.85,
0.00 2.42 -2.00, -0.77 2.55 -1.85,
-1.41 2.67 -1.41, -1.85 2.79 -0.77,
-2.00 2.91 0.00, -1.85 3.03 0.77,
-1.41 3.15 1.41, -0.77 3.27 1.85,
0.00 3.39 2.00, 0.77 3.52 1.85,
1.41 3.64 1.41, 1.85 3.76 0.77,
2.00 3.88 0.00,
]
}
}
# Spirnel
Viewpoint {
position 0.0 8.0 30.0
description "Entry view"
}
NavigationInfo {
type [ "EXAMINE", "ANY" ]
headlight TRUE
}
# Centrul
#
Transform {
translation 0.0 8.0 0.0
children [
Shape {
appearance DEF BaseColor Appearance {
material Material {
diffuseColor 1.0 0.5 1.0
}
}
geometry Cylinder {
height 18.0
30
radius 0.5
}
}
]
}
# Baza
#
Transform {
translation 0.0 -1.0 0.0
children [
Shape {
appearance USE BaseColor
geometry Cylinder {
height 0.25
radius 6.0
}
}
]
}
# Cupa
Transform {
translation 0.00 16.00 0.00
children [
Transform {
translation 4.50 0.0 -1.0
rotation 1.0 0.0 0.0 -1.571
children Shape {
appearance USE BaseColor
#geometry Box { size 2.5 2.5 2.5 }
geometry Cone {
height 2.5
bottomRadius 1.2
}
}
}
Transform {
translation 2.25 0.0 0.0
children Shape {
appearance USE BaseColor
geometry Box { size 4.5 0.5 0.5 }
}
}
]
}
#
# Brat
#
Transform {
31
children [
Transform {
translation 4.50 0.0 1.0
rotation 1.0 0.0 0.0 1.571
children Shape {
appearance USE BaseColor
#geometry Box { size 2.5 2.5 2.5 }
geometry Cone {
height 2.5
bottomRadius 1.2
}
}
}
Transform {
translation 2.25 0.0 0.0
children Shape {
appearance USE BaseColor
geometry Box { size 4.5 0.5 0.5 }
}
}
]
}
Tema
32
LUCRAREA NR. 5
Următorul program prezintă utilizarea nodurilor folosite pentru animaţie:
Programul principal este următorul:
#VRML V2.0 utf8
Group {
children [
DEF Entry Viewpoint {
position 0.0 3.1 10.0
description "Entry View" },
NavigationInfo {
avatarSize [ 0.5, 3.0, 1.5 ]
headlight FALSE },
DEF Proximity ProximitySensor {
size 10.0 10.0 50.0 },
PointLight {
ambientIntensity 0.0
color 0.6 0.6 0.6
location 0.0 6.0 -8.0 },
DirectionalLight {
ambientIntensity 0.0
color 0.0 0.15 0.5
direction 1.0 -1.0 -4.0 },
DirectionalLight {
ambientIntensity 0.0
intensity 1.5
color 1.0 0.0 0.0
direction -1.0 2.5 -1.0 },
Transform {
translation 0.0 -0.5 8.0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.8 0.8 0.8 }
texture DEF Granit ImageTexture {
url "granit_g.jpg" }
textureTransform TextureTransform {
scale 0.5 0.5 } }
geometry Box {
size 4.0 0.4 16.0 } }, ] },
DEF Stair1 Transform {
translation 0.0 0.0 0.0
children [
DEF Stair Inline {
url "tread.wrl" }, ] },
Transform {
translation -1.0 0.5 -2.0
children [
DEF Stair2 Transform {
translation 0.0 0.0 0.0
children [ USE Stair ] } ] },
33
Transform {
translation 1.5 1.0 -4.0
children [
DEF Stair3 Transform {
translation 0.0 0.0 0.0
children [ USE Stair ] } ] },
Transform {
translation 0.0 1.5 -6.0
children [
DEF Stair4 Transform {
translation 0.0 0.0 0.0
children [ USE Stair ] } ] },
Transform {
translation 0.0 2.0 -8.0
children [ USE Stair ] },
Transform {
translation 0.0 2.0 -10.0
scale 0.7 0.7 0.7
children [
Inline {
url "glowdoor.wrl" } ] },
Transform {
translation -2.0 6.0 -10.0
rotation 0.0 0.0 1.0 0.785
children [
DEF ArchBox Shape {
appearance Appearance {
material Material {
ambientIntensity 0.0
diffuseColor 1.0 1.0 1.0
emissiveColor 0.4 0.4 0.4 }
texture ImageTexture {
url "marble_g.jpg" } }
geometry Box {
size 4.0 0.2 2.0 } },
Transform {
translation 1.0 0.2 1.0
children [ USE ArchBox ] },
Transform {
translation 2.0 0.4 2.0
children [ USE ArchBox ] }, ] },
Transform {
translation 2.0 6.0 -10.0
rotation 0.0 0.0 1.0 -0.785
children [
USE ArchBox,
Transform {
translation -1.0 0.2 1.0
children [ USE ArchBox ] },
Transform {
translation -2.0 0.4 2.0
children [ USE ArchBox ] }, ] },
34
Transform {
translation 0.0 7.0 0.0
scale 1.0 2.0 1.0
children [
Inline {
url "redwall.wrl" }, ] }, ] }
# Controlul animaţiei
DEF Stair1Timer TimeSensor {
cycleInterval 4.0
loop TRUE }
DEF Stair1Path PositionInterpolator {
key [ 0.0, 0.25, 0.5, 0.75, 1.0 ]
keyValue [ 0.0 0.0 0.0, 3.0 0.0 0.0, 0.0 0.0 0.0, -3.0 0.0 0.0, 0.0 0.0 0.0 ] }
ROUTE Proximity.enterTime TO Stair1Timer.set_startTime
ROUTE Stair1Timer.fraction_changed TO Stair1Path.set_fraction
ROUTE Stair1Path.value_changed TO Stair1.set_translation
DEF Stair2Timer TimeSensor {
cycleInterval 4.0
loop TRUE }
DEF Stair2Path PositionInterpolator {
key [ 0.0, 0.25, 0.5, 0.75, 1.0 ]
keyValue [ 3.0 0.0 0.0, 0.0 0.0 0.0, -3.0 0.0 0.0, 0.0 0.0 0.0, 3.0 0.0 0.0 ] }
ROUTE Proximity.enterTime TO Stair2Timer.set_startTime
ROUTE Stair2Timer.fraction_changed TO Stair2Path.set_fraction
ROUTE Stair2Path.value_changed TO Stair2.set_translation
DEF Stair3Timer TimeSensor {
cycleInterval 4.0
loop TRUE }
DEF Stair3Path PositionInterpolator {
key [ 0.0, 0.25, 0.5, 0.75, 1.0 ]
keyValue [ -3.0 0.0 0.0, 0.0 0.0 0.0, 3.0 0.0 0.0, 0.0 0.0 0.0, -3.0 0.0 0.0 ] }
ROUTE Proximity.enterTime TO Stair3Timer.set_startTime
ROUTE Stair3Timer.fraction_changed TO Stair3Path.set_fraction
ROUTE Stair3Path.value_changed TO Stair3.set_translation
DEF Stair4Timer TimeSensor {
cycleInterval 4.0
loop TRUE }
DEF Stair4Path PositionInterpolator {
key [ 0.0, 0.25, 0.5, 0.75, 1.0 ]
keyValue [ 0.0 0.0 0.0, -3.0 0.0 0.0, 0.0 0.0 0.0, 3.0 0.0 0.0, 0.0 0.0 0.0 ] }
ROUTE Proximity.enterTime TO Stair4Timer.set_startTime
ROUTE Stair4Timer.fraction_changed TO Stair4Path.set_fraction
ROUTE Stair4Path.value_changed TO Stair4.set_translation
Viewpoint {
position 0.0 0.0 12.0
description "Entry view"
}
NavigationInfo {
type [ "EXAMINE", "ANY" ]
headlight TRUE
}
# Cub rosu
# Cub albastru
3. Grup de poliedre
40
NavigationInfo {
type [ "EXAMINE", "ANY" ]
headlight TRUE
}
Transform { translation 0.0 0.0 -3.0 rotation 1.0 0.0 0.0 3.1415 children USE Poli }
Transform { translation -3.0 0.0 -3.0 children USE Poli }
Transform { translation 3.0 0.0 -3.0 children USE Poli }
Transform { translation 0.0 0.0 3.0 rotation 1.0 0.0 0.0 3.1415 children USE Poli }
Transform { translation -3.0 0.0 3.0 children USE Poli }
Transform { translation 3.0 0.0 3.0 children USE Poli }
Viewpoint {
position 35.0 1.65 -35.0
orientation 0.0 1.0 0.0 2.356
description "Perspectiva"
}
Viewpoint {
position 0.0 14.43 2.0
orientation 0.00128 0.959 0.282 3.1503
description "Acoperis"
}
# In cadrul Transform – pentru aripi
NavigationInfo {
type [ "WALK", "ANY" ]
headlight FALSE
speed 3.0
}
Background {
skyColor [
0.0 0.2 0.8,
0.1 0.3 0.9
0.7 0.7 0.7
]
skyAngle [
1.3,
1.471
]
}
#
# Lumini
#
43
DirectionalLight {
color 1.0 1.0 1.0
intensity 1.0
ambientIntensity 0.8
direction -1.0 -1.0 -1.0
}
#
# Teren
#
Transform {
translation 0.0 -0.005 0.0
children Shape {
appearance Appearance {
material Material {
ambientIntensity 0.7
diffuseColor 0.0 0.5 0.1
}
texture ImageTexture { url "Parc.jpg" }
textureTransform TextureTransform { scale 2.0 2.0 }
}
geometry IndexedFaceSet {
coord Coordinate {
point [
-100.0 0.0 100.0,
100.0 0.0 100.0,
100.0 0.0 -100.0,
-100.0 0.0 -100.0,
]
}
coordIndex [ 0, 1, 2, 3 ]
texCoord TextureCoordinate {
point [
0.0 0.0,
1.0 0.0,
1.0 1.0,
0.0 1.0,
]
}
texCoordIndex [ 0, 1, 2, 3 ]
}
}
}
#
# Turnul
#
Transform {
translation 0.0 5.0 0.0
children Shape {
appearance Appearance {
material Material {
ambientIntensity 0.3
44
diffuseColor 1.0 1.0 1.0
}
texture ImageTexture { url "primule.jpg" }
textureTransform TextureTransform { scale 2.0 2.0 }
}
geometry Cylinder {
radius 5.0
height 10.0
top FALSE
bottom FALSE
}
}
}
#
# Acoperis
#
Transform {
translation 0.0 12.0 0.0
children Shape {
appearance DEF Tile Appearance {
material Material {
ambientIntensity 0.3
diffuseColor 0.8 0.0 0.0
}
texture ImageTexture { url "Orhid.jpg" }
textureTransform TextureTransform { scale 4.0 4.0 }
}
geometry Cone {
bottomRadius 6.0
height 4.0
}
}
}
#
# Intrare
#
Transform {
translation 3.55 0.0 3.55
rotation 0.0 1.0 0.0 0.785
children [
#
# Acoperis
#
Transform {
translation 0.0 3.6 0.0
children Shape {
appearance USE Tile
geometry Cone {
bottomRadius 1.5
45
height 2.0
}
}
}
#
# Usa
#
Shape {
appearance Appearance {
material Material {
ambientIntensity 0.3
diffuseColor 0.4 0.2 0.0
}
texture ImageTexture { url "ban.jpg" }
}
geometry IndexedFaceSet {
coord Coordinate {
point [
-0.7 0.0 0.15,
0.7 0.0 0.15,
0.7 2.9 0.15,
-0.7 2.9 0.15,
0.0 0.0,
0.08 0.0,
0.08 1.0,
0.0 1.0,
]
}
texCoordIndex [
0, 1, 2, 3, -1,
4, 5, 6, 7, -1,
4, 5, 6, 7, -1,
]
46
}
}
#
# Trepte
#
Transform {
translation 0.0 0.05 0.5
children Shape {
appearance Appearance {
material Material {
diffuseColor 0.4 0.4 0.4
}
}
geometry Box {
size 2.0 0.1 1.0
}
}
}
]
}
#
# Animare Aripi
#
DEF Aripi Transform {
translation 0.0 8.0 6.5
# rotire axa Z
children [
#
Viewpoint {
position 0.0 6.5 -0.1
#orientation 0.0 1.0 0.0 1.571
description "Pe aripile vantului"
}
# Ax
#
Transform {
translation 0.0 0.0 -0.75
rotation 1.0 0.0 0.0 1.571
children Shape {
appearance DEF Wood Appearance {
material Material {
diffuseColor 0.6 0.4 0.0
}
}
geometry Cylinder {
radius 0.8
height 1.5
bottom FALSE
}
47
}
}
#
# Prima Aripa
#
DEF Aripa Transform {
translation 0.0 3.5 0.1
children [
#
# Aripa
#
Transform {
translation 0.0 1.0 0.1
children Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 1.0
}
texture ImageTexture { url "aripa.jpg" }
textureTransform TextureTransform {
scale 2.0 6.0
}
}
geometry Box {
size 2.0 6.0 0.1
}
}
}
#
# Support for Aripa
#
Shape {
appearance USE Wood
geometry Box {
size 0.1 7.0 0.1
}
}
]
}
#
# 3 Aripi
#
Transform {
rotation 0.0 0.0 1.0 1.571
children USE Aripa
}
Transform {
rotation 0.0 0.0 1.0 -1.571
children USE Aripa
}
Transform {
rotation 0.0 0.0 1.0 3.141
48
children USE Aripa
}
]
}
49