vrml trabajo
TRANSCRIPT
Trabajo N°1 – VRML
Apellidos y nombres: Samamé Jiménez, Hilda Ana
Código: 10140138
* Pregunta N°1
Código:
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 "F:\Examen-2013\Preg1\fondo_plomo.jpg" }
Transform {translation 0 0 2children [
Shape {geometry Cone {
bottomRadius 0.2height 2
}appearance Appearance {
material Material {diffuseColor 0 1 1}
}}]
}
Transform {translation 4 0 -5children [
Shape {geometry Box { size 0.3 2 0.3}
appearance Appearance{
material Material {diffuseColor 1 1 0}
}}]
}
Transform {translation -4 0 -5children [
Shape {geometry Box { size 0.3 2 0.3}appearance Appearance{
material Material {diffuseColor 0 0 1}
}}]
}
Ejecución:
* Pregunta N°2
Código:
#VRML V2.0 utf8#Creando la estrucura del payaso
#sombreroTransform {
translation 0 0 0children Shape {
appearance Appearance {material Material {
diffuseColor 0 0 1specularColor 1 1 1 #apariencia de
brillo al centro}
}geometry Cone {
bottomRadius 3height 2
}}
}
#cabezaTransform {
translation 0 -2 0children Shape {
appearance Appearance {material Material {
diffuseColor 0.5 0.5 0.5specularColor 1 1 1 #apariencia de
brillo al centro}
}geometry Sphere {
radius 2.3}
}}
#cuerpo#cilindro tronco del payasoTransform {
translation 0 -6.5 0children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo al
centro}
}geometry Cylinder {
radius 3height 4
}}
}# cilindro cuelloTransform {
translation 0 -4 0children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo al
centro}
}geometry Cylinder {
radius .5height 1
}}
}
# cilindro hechado superiorTransform {
translation 0 -5 2.5rotation 1 1 0 3.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo al
centro}
}geometry Cylinder {
radius .5height 5
}}
}
# cilindro hechado inferior
Transform {translation 0 -8 2.5rotation 1 1 0 3.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo al
centro}
}geometry Cylinder {
radius .5height 5
}}
}
#Extrmidades
#extremidad derecha parte1Transform {
translation 4 -6.25 2.5rotation 0 0 1 4.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de
brillo al centro}
}geometry Cylinder {
radius .5height 5
}}
}
#extremidad izquierda parte1Transform {
translation -4 -6.25 2.5rotation 0 0 1 -4.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0
specularColor 1 1 1 #apariencia de brillo al centro
}}geometry Cylinder {
radius .5height 5
}}
}
#extremidad izquierda parte2Transform {
translation -7 -6.5 2.5rotation 0 0 1 -2.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo
al centro}
}geometry Cylinder {
radius .5height 3
}}
}
#extremidad derecha parte2Transform {
translation 7 -6.5 2.5rotation 0 0 1 2.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 #apariencia de brillo
al centro}
}geometry Cylinder {
radius .5height 3
}}
}
#esferas =manos#mano izquierdaTransform {
translation -8 -5.5 2.5children Shape {
appearance Appearance {material Material {
diffuseColor 0 1 0 specularColor 1 1 1 #apariencia de
brillo al centro}
}geometry Sphere {
radius 1}
}}
#mano derechaTransform {
translation 8 -5.5 2.5children Shape {
appearance Appearance {material Material {
diffuseColor 0 1 0 specularColor 1 1 1 #apariencia de brillo al
centro}
}geometry Sphere {
radius 1}
}}#Clones del payaso#primer clon a su mano derechaTransform {
#cale 0.5 0.5 0.5translation 13 0 0children [
Inline {url "clon.wrl"}]}
#segundo clon a su mano izquierdaTransform {
#cale 0.5 0.5 0.5translation -13 0 0children [
Inline {url "clon.wrl"}]}
# CLones en la parte posterior#clon posterior izquierdaTransform {
#cale 0.5 0.5 0.5translation -12 0 -5children [
Inline {url "clon.wrl"}]}#clon posterior derechaTransform {
#cale 0.5 0.5 0.5translation 12 0 -5children [
Inline {url "clon.wrl"}]}
Subrutina CLON
#VRML V2.0 utf8
#sombreroTransform {
translation 0 0 0children Shape {
appearance Appearance {material Material {
diffuseColor 0 0 1specularColor 1 1 1
}}geometry Cone {
bottomRadius 3height 2
}}
}#cabezaTransform {
translation 0 -2 0children Shape {
appearance Appearance {material Material {
diffuseColor 0.5 0.5 0.5specularColor 1 1 1
}}geometry Sphere {
radius 2.3}
}}#cuerpoTransform {
translation 0 -6.5 0children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1}
}geometry Cylinder {
radius 3height 4
}
}}Transform {
translation 0 -4 0children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 }
}geometry Cylinder {
radius .5height 1
}}
}
Transform {translation 0 -5 2.5rotation 1 1 0 3.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 }
}geometry Cylinder {
radius .5height 5
}}
}Transform {
translation 0 -8 2.5rotation 1 1 0 3.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 }
}geometry Cylinder {
radius .5height 5
}}
}Transform {
translation 4 -6.25 2.5rotation 0 0 1 4.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 }
}geometry Cylinder {
radius .5height 5
}}
}Transform {
translation -4 -6.25 2.5rotation 0 0 1 -4.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 }
}geometry Cylinder {
radius .5height 5
}}
}
Transform {translation -7 -6.5 2.5rotation 0 0 1 -2.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 }
}geometry Cylinder {
radius .5height 3
}}
}
Transform {translation 7 -6.5 2.5rotation 0 0 1 2.1416children Shape {
appearance Appearance {material Material {
diffuseColor 1 0 0 specularColor 1 1 1 }
}geometry Cylinder {
radius .5height 3
}}
}#esferasTransform {
translation -8 -5.5 2.5children Shape {
appearance Appearance {material Material {
diffuseColor 0 1 0 specularColor 1 1 1 }
}geometry Sphere {
radius 1}
}}Transform {
translation 8 -5.5 2.5children Shape {
appearance Appearance {material Material {
diffuseColor 0 1 0 specularColor 1 1 1 }
}geometry Sphere {
radius 1}
}}
#
Transform {scale 0.5 0.5 0.5translation 0 10 0children [
Inline {url "mueco.wrl"}]}
Ejecución:
* Pregunta N°3
Código:
#VRML V2.0 utf8
#Creación de los planetas.
DEF Planeta Transform {children Transform {
translation 5 0 0children [
Shape {geometry Sphere { radius 0.3 }appearance Appearance { material
Material { diffuseColor 1 1 0 } }}
Sound {minFront 0.2minBack 0.2maxFront 20maxBack 20spatialize TRUEsource AudioClip {
url "F:\Examen-2013\Preg3\audio1.mp3"
startTime 1loop TRUE
}}
]}
}DEF Planeta1 Transform {
children Transform {translation -5 0 0children [
Shape { # EL PEQUEO CIRCULOgeometry Sphere { radius 0.3 }appearance Appearance { material
Material { diffuseColor 1 2 0 } }}
]}
}
DEF Planeta2 Transform {children Transform {
translation 0 0 5children [
Shape { #geometry Sphere { radius 0.3 }appearance Appearance { material
Material { diffuseColor 1 2 0 } }}
]}
}DEF Planeta3 Transform {
children Transform {translation 0 0 -5children [
Shape { # geometry Sphere { radius 0.3 }appearance Appearance { material
Material { diffuseColor 1 2 0 } }}
]}
}
DEF Planeta4 Transform {children Transform {
translation 3.53 0 3.53children [
Shape { # geometry Sphere { radius 0.3 }appearance Appearance { material
Material { diffuseColor 1 2 0 } }}
]}
}
DEF Planeta5 Transform {children Transform {
translation -3.53 0 3.53children [
Shape { # geometry Sphere { radius 0.3 }appearance Appearance { material
Material { diffuseColor 1 2 0 } }}
]}
}
DEF Planeta6 Transform {children Transform {
translation 3.53 0 -3.53children [
Shape { # geometry Sphere { radius 0.3 }appearance Appearance { material
Material { diffuseColor 1 2 0 } }}
]}
}
DEF Planeta7 Transform {children Transform {
translation -3.53 0 -3.53children [
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 1loop TRUEcycleInterval 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 planetasROUTE MotorPlaneta.fraction_changed TO
MovimentPlaneta.set_fractionROUTE MovimentPlaneta.value_changed TO Planeta.rotation
ROUTE MovimentPlaneta.value_changed TO Planeta1.rotationROUTE MovimentPlaneta.value_changed TO Planeta2.rotationROUTE MovimentPlaneta.value_changed TO Planeta3.rotationROUTE MovimentPlaneta.value_changed TO Planeta4.rotation ROUTE MovimentPlaneta.value_changed TO Planeta5.rotationROUTE MovimentPlaneta.value_changed TO Planeta6.rotationROUTE MovimentPlaneta.value_changed TO Planeta7.rotation
Ejecución:
* Pregunta N°4
Código:
#VRML V2.0 utf8
#Estructura del cuarto #Estes es el piso del cuartoShape {
appearance DEF Color Appearance { texture ImageTexture {url "como.jpg"}
material Material {diffuseColor 1 0 1
}}
geometry Box {size 8 0.1 10}
}
#Paredes del cuartoTransform {
translation -4 3.5 0children [
Shape {appearance USE Color
geometry Box {size 0.1 7 10
}}]}
Transform {translation 4 3.5 0children [
Shape {appearance USE Color
geometry Box {size 0.1 7 10
}}]}#techo del cuarto
Transform {translation 0 7 0children[
Shape {appearance Appearance { texture ImageTexture {url
"techo.jpg"}material Material {diffuseColor 1 0 1specularColor 0 1 1}
} geometry Box {
size 8 0.1 10}
}]}Transform {
translation 0 3.5 -5children [
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 0scale 1.5 1.5 1.5
children [Inline {url "mesa.wrl"}]}
#Las sillas del cuartoTransform {
translation 2.1 1 -2scale 0.2 0.2 0.2
children [Inline {url "silla.wrl"}]}Transform {
translation 0 1 0rotation 0 1 0 1.5718scale 0.2 0.2 0.2
children [Inline {url "silla.wrl"}]}Transform {
translation 1.8 1 0.9rotation 0 1 0 3.1416scale 0.2 0.2 0.2
children [Inline {url "silla.wrl"}]}
#Lampara
Transform {translation 0 6.4 0scale 0.5 0.4 0.5children [
Inline {url "lampara.wrl"}]
}
#La Cama
Transform {translation -2.5 1.5 0.9scale 0.25 0.3 0.3children [
Inline {url "cama.wrl"}]}
Ejecución: