#VRML V2.0 utf8
#合わせた形 filename=ex01_puppet.wrl
#cone
Transform { #円錐のローカル座標の原点を
translation 0.4 2 0 #(0.4, 2, 0)に移動
rotation 0 0 -1 0.375 #(0, 0, -1)ベクトルを軸に
children [ #0.375ラジアン回転
Shape {
appearance Appearance {
material Material{ diffuseColor 0 0 1 }
}
geometry Cone {
bottomRadius 0.45
height 1.5 }
}]}
#sphere
Transform { #球のローカル座標の原点を
translation 0 1 0 #(0, 1, 0)に移動
children [
Shape {
appearance Appearance {
material Material{ diffuseColor 0.8 0.6 0.4 }
}
geometry Sphere{ radius 0.5 }
}]}
#sphere
Transform { #球のローカル座標の原点を
translation 0 1 0.45 #(0, 1, 0.45)に移動
scale 0.15 0.15 1 #スケールを(0.15, 0.15, 1)にして
children [ #細長い楕円球に変形
Shape {
appearance Appearance {
material Material{ diffuseColor 0.8 0.6 0.4 }
}
geometry Sphere{ radius 0.5 }
}]}
#box
Transform { #直方体のローカル座標の原点を
translation 0 -0.1 0 #(0, -0.1, 0)に移動
children [
Shape {
appearance Appearance {
texture ImageTexture { url "cd081.gif" }
}
geometry Box {
size 1.5 1.2 1.2 }
}]}
#cylinder1 left
Transform { #円柱のローカル座標の原点を
translation -0.95 0 0 #(-0.95, 0, 0)に移動
rotation 0 0 -1 0.75 #(0, 0, -1)ベクトルを軸に
children [ #0.75ラジアン回転
Shape {
appearance Appearance {
texture ImageTexture { url "cd001.gif" }
}
geometry Cylinder {
radius 0.1 height 0.6 }
}]}
#cylinder1 right
Transform { #円柱のローカル座標の原点を
translation 0.95 0 0 #(0.95, 0, 0)に移動
rotation 0 0 -1 -0.75 #(0, 0, -1)ベクトルを軸に
children [ #-0.75ラジアン回転
Shape {
appearance Appearance {
texture ImageTexture { url "cd001.gif" }
}
geometry Cylinder {
radius 0.1 height 0.6 }
}]}
#cylinder2 left
Transform { #円柱のローカル座標の原点を
translation -0.5 -1.25 0 #(-0.5, -1.25, 0)に移動
rotation 0 0 -1 0.375 #(0, 0, -1)ベクトルを軸に
children [ #0.375ラジアン回転
Shape {
appearance Appearance {
texture ImageTexture { url "cd138.gif" }
}
geometry Cylinder {
radius 0.12 height 1.2 }
}]}
#cylinder2 right
Transform { #円柱のローカル座標の原点を
translation 0.5 -1.25 0 #(0.5, -1.25, 0)に移動
rotation 0 0 -1 -0.375 #(0, 0, -1)ベクトルを軸に
children [ #-0.375ラジアン回転
Shape {
appearance Appearance {
texture ImageTexture { url "cd138.gif" }
}
geometry Cylinder {
radius 0.12 height 1.2 }
}]}
|