以下、x軸に沿って回転した円柱を左側に、
z軸に沿って回転した円柱を右側に表示した例です。
rotation 以下の値の違いに着目してください。
また、円柱(Cylinder)が、children の後の
[ ] の中に書かれていることに着目してください。
#VRML V2.0 utf8
Transform {
rotation 1.0 0.0 0.0 0.8
translation -2.0 0.0 0.0
children [
Shape {
geometry Cylinder {
height 2.0
radius 1.5
}
}
]
}
Transform {
rotation 0.0 0.0 1.0 1.1
translation 2.0 0.0 0.0
children [
Shape {
geometry Cylinder {
height 2.0
radius 1.5
}
}
]
}
|
ここで「回転の大きさ」は、180度を3.14として、
90度を1.57とした数字で表します。
ちょっと難しいですが、いろいろ試してみてください。