簡単なVRMLをエディターで作成してみましょう



今度は、立方体が傾いているのが見えています。

エディターで記述してある中身は以下の通りです。


#VRML V1.0 ascii
Separator {
DEF BackgroundColor Info{
string " 0.1 0.9 0.8 "
}
PerspectiveCamera {
position 0 0 10
focalDistance 5
heightAngle 2.1726
}
Separator {
Material { ambientColor 1 0 0 }
Rotation { rotation 1 0 0 0.8 }
Rotation { rotation 0 1 0 0.8 }
Cube{
width 2
height 2
depth 2
}

}
}



Rotation ではShapeに対する傾きを指定しています。

{ rotation 1 0 0 0.8 } はShapeに対してX軸方向に0.8の傾きを指定しています。


[前に戻る] [次へ進む]