You are on page 1of 21

Trabajo N1 VRML

Apellidos y nombres: Samam Jimnez, Hilda Ana Cdigo: 10140138

* Pregunta N1 Cdigo: Background{ frontUrl "F:\Examen-2013\Preg1\paisaje1.png" skyAngle [ 1.2 1.57] skyColor [0 0 1, 0 0 0.6, 1 0 0] groundColor [0.75 0.75 0.75] #bottomUrl } Transform { translation children [ "F:\Examen-2013\Preg1\fondo_plomo.jpg"

002

Shape { geometry Cone { bottomRadius 0.2 height 2 } appearance Appearance { material Material {diffuseColor } } ] } 0 1 1}

Transform { translation children [

4 0 -5

Shape { geometry Box { size 0.3 2 0.3}

appearance Appearance { material Material {diffuseColor } } ] } Transform { translation children [

1 1 0}

-4 0 -5

Shape { geometry Box { size 0.3 2 0.3} appearance Appearance { material Material {diffuseColor } } ] }

0 0 1}

Ejecucin:

* Pregunta N2 Cdigo: #VRML V2.0 utf8 #Creando la estrucura del payaso #sombrero Transform { translation 0 0 0 children Shape { appearance Appearance { material Material { diffuseColor 0 0 1 specularColor 1 1 1 #apariencia de brillo al centro } } geometry Cone { bottomRadius 3 height 2 } } } #cabeza Transform { translation 0 -2 0 children Shape { appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 specularColor 1 1 1 #apariencia de brillo al centro } } geometry Sphere { radius 2.3 } } } #cuerpo #cilindro tronco del payaso Transform { translation 0 -6.5 0 children Shape { appearance Appearance { material Material {

diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius 3 height 4 } } } # cilindro cuello Transform { translation 0 -4 0 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius .5 height 1 } } }

#apariencia de brillo al centro

#apariencia de brillo al centro

# cilindro hechado superior Transform { translation 0 -5 2.5 rotation 1 1 0 3.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo al centro } } geometry Cylinder { radius .5 height 5 } } } # cilindro hechado inferior

Transform { translation 0 -8 2.5 rotation 1 1 0 3.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo al centro } } geometry Cylinder { radius .5 height 5 } } }

#Extrmidades #extremidad derecha parte1 Transform { translation 4 -6.25 2.5 rotation 0 0 1 4.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 centro } } geometry Cylinder { radius .5 height 5 } } } #extremidad izquierda parte1 Transform { translation -4 -6.25 2.5 rotation 0 0 1 -4.1416 children Shape { appearance Appearance { material Material {

#apariencia de brillo al

diffuseColor 1 0 0 specularColor 1 1 1 brillo al centro } } geometry Cylinder { radius .5 height 5 } } } #extremidad izquierda parte2 Transform { translation -7 -6.5 2.5 rotation 0 0 1 -2.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 centro } } geometry Cylinder { radius .5 height 3 } } } #extremidad derecha parte2 Transform { translation 7 -6.5 2.5 rotation 0 0 1 2.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 centro } } geometry Cylinder { radius .5 height 3

#apariencia de

#apariencia de brillo al

#apariencia de brillo al

} } }

#esferas =manos #mano izquierda Transform { translation -8 -5.5 2.5 children Shape { appearance Appearance { material Material { diffuseColor 0 1 0 specularColor 1 1 1 centro } } geometry Sphere { radius 1 } } } #mano derecha Transform { translation 8 -5.5 2.5 children Shape { appearance Appearance { material Material { diffuseColor 0 1 0 specularColor 1 1 1 } } geometry Sphere { radius 1 } } } #Clones del payaso #primer clon a su mano derecha Transform { #cale 0.5 0.5 0.5 translation 13 0 0 children [ Inline { url "clon.wrl"

#apariencia de brillo al

#apariencia de brillo al centro

} ] } #segundo clon a su mano izquierda Transform { #cale 0.5 0.5 0.5 translation -13 0 0 children [ Inline { url "clon.wrl" } ] }

# CLones en la parte posterior #clon posterior izquierda Transform { #cale 0.5 0.5 0.5 translation -12 0 -5 children [ Inline { url "clon.wrl" } ] } #clon posterior derecha Transform { #cale 0.5 0.5 0.5 translation 12 0 -5 children [ Inline { url "clon.wrl" } ] }

Subrutina CLON #VRML V2.0 utf8 #sombrero Transform { translation 0 0 0 children Shape { appearance Appearance { material Material { diffuseColor 0 0 1 specularColor 1 1 1 } } geometry Cone { bottomRadius 3 height 2 } } } #cabeza Transform { translation 0 -2 0 children Shape { appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 specularColor 1 1 1 } } geometry Sphere { radius 2.3 } } } #cuerpo Transform { translation 0 -6.5 0 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius 3

height 4 } } } Transform { translation 0 -4 0 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius .5 height 1 } } } Transform { translation 0 -5 2.5 rotation 1 1 0 3.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius .5 height 5 } } } Transform { translation 0 -8 2.5 rotation 1 1 0 3.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } }

geometry Cylinder { radius .5 height 5 } } } Transform { translation 4 -6.25 2.5 rotation 0 0 1 4.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius .5 height 5 } } } Transform { translation -4 -6.25 2.5 rotation 0 0 1 -4.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius .5 height 5 } } } Transform { translation -7 -6.5 2.5 rotation 0 0 1 -2.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0

specularColor 1 1 1 } } geometry Cylinder { radius .5 height 3 } } } Transform { translation 7 -6.5 2.5 rotation 0 0 1 2.1416 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 specularColor 1 1 1 } } geometry Cylinder { radius .5 height 3 } } } #esferas Transform { translation -8 -5.5 2.5 children Shape { appearance Appearance { material Material { diffuseColor 0 1 0 specularColor 1 1 1 } } geometry Sphere { radius 1 } } } Transform { translation 8 -5.5 2.5 children Shape { appearance Appearance { material Material {

diffuseColor 0 1 0 specularColor 1 1 1 } } geometry Sphere { radius 1 } } } # Transform { scale 0.5 0.5 0.5 translation 0 10 0 children [ Inline { url "mueco.wrl" } ] }

Ejecucin:

* Pregunta N3 Cdigo: #VRML V2.0 utf8 #Creacin de los planetas. DEF Planeta Transform { children Transform { translation 5 0 0 children [ Shape { geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 1 0 } } } Sound { minFront 0.2 minBack 0.2 maxFront 20 maxBack 20 spatialize TRUE source AudioClip { url "F:\Examen2013\Preg3\audio1.mp3" startTime 1 loop TRUE } } ] } } DEF Planeta1 Transform { children Transform { translation -5 0 0 children [ Shape { # EL PEQUEO CIRCULO geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 2 0 } } } ] } }

DEF Planeta2 Transform { children Transform { translation 0 0 5 children [ Shape { # geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 2 0 } } } ] } } DEF Planeta3 Transform { children Transform { translation 0 0 -5 children [ Shape { # geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 2 0 } } } ] } } DEF Planeta4 Transform { children Transform { translation 3.53 0 3.53 children [ Shape { # geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 2 0 } } } ] } } DEF Planeta5 Transform { children Transform { translation -3.53 0 3.53 children [ Shape { # geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 2 0 } }

} ] } } DEF Planeta6 Transform { children Transform { translation 3.53 0 -3.53 children [ Shape { # geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 2 0 } } } ] } } DEF Planeta7 Transform { children Transform { translation -3.53 0 -3.53 children [ Shape { # geometry Sphere { radius 0.3 } appearance Appearance { material Material { diffuseColor 1 2 0 } } } ] } } DEF Cap Shape { geometry Sphere { radius 0.7 } appearance Appearance { material Material { diffuseColor 1 0.7 0.6 } } } DEF MotorPlaneta TimeSensor { startTime 1 loop TRUE cycleInterval 2 } DEF MovimentPlaneta OrientationInterpolator { key [ 0, 0.5, 1 ]

keyValue [ 0 1 0 0, 0 1 0 3.1416, 0 1 0 6.2832 ] } #Movimiento de los planetas ROUTE MotorPlaneta.fraction_changed TO MovimentPlaneta.set_fraction ROUTE MovimentPlaneta.value_changed TO Planeta.rotation ROUTE MovimentPlaneta.value_changed TO Planeta1.rotation ROUTE MovimentPlaneta.value_changed TO Planeta2.rotation ROUTE MovimentPlaneta.value_changed TO Planeta3.rotation ROUTE MovimentPlaneta.value_changed TO Planeta4.rotation ROUTE MovimentPlaneta.value_changed TO Planeta5.rotation ROUTE MovimentPlaneta.value_changed TO Planeta6.rotation ROUTE MovimentPlaneta.value_changed TO Planeta7.rotation Ejecucin:

* Pregunta N4 Cdigo: #VRML V2.0 utf8 #Estructura del cuarto #Estes es el piso del cuarto Shape { appearance DEF Color Appearance { texture ImageTexture {url "como.jpg"} material Material { diffuseColor 1 0 1 } } geometry Box { size 8 0.1 10 } } #Paredes del cuarto Transform { translation -4 3.5 0 children [ Shape { appearance USE Color geometry Box { size 0.1 7 10 } } ] } Transform { translation 4 3.5 0 children [ Shape { appearance USE Color geometry Box { size 0.1 7 10 } } ] }

#techo del cuarto Transform { translation 0 7 0 children[ Shape { appearance Appearance { texture ImageTexture {url "techo.jpg"} material Material { diffuseColor 1 0 1 specularColor 0 1 1 } } geometry Box { size 8 0.1 10 } } ] } Transform { translation 0 3.5 -5 children [ Shape { appearance Appearance { texture ImageTexture {url "ventana.jpg"} material Material { } } geometry Box { size 8 7 0.1 } } ] } # Usando Objetos almacenados en ficheros #usamos nodo Inline #Mesa Transform { translation 2.1 0.7 0 scale 1.5 1.5 1.5

children [

Inline { url "mesa.wrl" } ] } #Las sillas del cuarto Transform { translation 2.1 1 -2 scale 0.2 0.2 0.2

children [ Inline { url "silla.wrl" } ] } Transform { translation 0 1 0 rotation 0 1 0 1.5718 scale 0.2 0.2 0.2

children [ Inline { url "silla.wrl" } ] } Transform { translation 1.8 1 0.9 rotation 0 1 0 3.1416 scale 0.2 0.2 0.2

children [ Inline { url "silla.wrl" } ] } #Lampara

Transform { translation 0 6.4 0 scale 0.5 0.4 0.5 children [ Inline { url "lampara.wrl" } ] } #La Cama

Transform { translation -2.5 1.5 0.9 scale 0.25 0.3 0.3 children [ Inline { url "cama.wrl" } ] } Ejecucin:

You might also like