#形状を生成する(車輪) Shape { geometry Cylinder { #円柱 height 0.001 #厚さ radius 0.0025 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } }
#形状を生成する(車輪1/2) Transform { translation 0 0 -0.005 #移動距離 children [ Shape { geometry Cylinder { #円柱 height 0.001 #厚さ radius 0.0025 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] } #形状を生成する(車輪2/2) Transform { translation 0 0 0.005 #移動距離 children [ Shape { geometry Cylinder { #円柱 height 0.001 #厚さ radius 0.0025 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] }
#形状を生成する(フランジ1/2) Transform { translation 0 0.0025 0.004525 #移動距離 children [ Shape { geometry Cylinder { #円柱 height 0.0005 #厚さ radius 0.003 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] } #形状を生成する(フランジ2/2) Transform { translation 0 0.0025 -0.004525 #移動距離 children [ Shape { geometry Cylinder { #円柱 height 0.0005 #厚さ radius 0.003 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] } #形状を生成する(車軸) Transform { translation 0 0.0025 0 #移動距離 children [ Shape { geometry Cylinder { #円柱 height 0.009 #厚さ radius 0.001 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] }
#グループ化する #↓ここからグループ化 DEF Obj2 Group { children [ #グループ化する #↓ここからグループ化 DEF Obj1 Group { children [ #形状を生成する(車輪1/2) Transform { translation -0.051 0.025 -0.005 #移動距離 children [ Shape { geometry Cylinder { #円柱 height 0.001 #厚さ radius 0.0025 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] } ・ ・ ] } #↑ここまでグループ化(Obj1) #グループ化したものを使う(車輪、フランジ、車軸) Transform { children USE Obj1 translation 0.014 0 0 } ] } #↑ここまでグループ化(Obj2) #グループ化したものを使う(車輪、フランジ、車軸の組) Transform { children USE Obj2 center 0 0 0 #回転中心 rotation 0 0 1 3.1417159 #回転軸と角度 }
#形状を生成する(車体中央) Transform { translation 0 0.008 0 #移動距離 children [ Shape { geometry Box { #直方体 size 0.118 0.001 0.014 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] } #グループ化する #↓ここからグループ化 DEF Obj4 Group { children [ #グループ化する #↓ここからグループ化 DEF Obj3 Group { children [ #形状を生成する(車体側面1/5) Transform { translation -0.04825 0.0075 -0.00775 #移動距離 children [ Shape { geometry Box { #直方体 size 0.0215 0.002 -0.0015 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] } #形状を生成する(車体側面2/5) Transform { translation -0.0275 0.0085 -0.00775 #移動距離 children [ Shape { geometry IndexedFaceSet { solid FALSE coord Coordinate { point [ -0.01 0 -0.00075, 0.01 0 -0.00075, 0.01 -0.005 -0.00075, -0.01 -0.002 -0.00075, -0.01 0 0.00075, 0.01 0 0.00075, 0.01 -0.005 0.00075, -0.01 -0.002 0.00075 ] } color Color { color [ 0 0 0.5 ] } coordIndex [ 0 1 2 -1 2 3 0 -1 4 5 6 -1 6 7 4 -1 0 4 7 -1 7 3 0 -1 1 5 6 -1 6 2 1 -1 0 1 5 -1 5 4 0 -1 3 2 6 -1 6 7 3 -1 ] colorIndex [ 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 ] } } ] } ] } #↑ここまでグループ化(Obj3) #形状を生成する(車体側面3/5) Transform { translation 0 0.006 -0.00775 #移動距離 children [ Shape { geometry Box { #直方体 size 0.035 0.005 0.0015 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] } #グループ化したものを使う(車体側面4/5、5/5) Transform { children USE Obj3 center 0 0 -0.00775 #回転中心 rotation 0 1 0 3.1417159 #回転軸と角度 } ] } #↑ここまでグループ化(Obj4) #グループ化したものを使う(反対側の車体側面) Transform { children USE Obj4 center 0 0 0 #回転中心 rotation 0 1 0 3.1417159 #回転軸と角度 } #形状を生成する(車体端面) Transform { translation 0.05875 0.0115 0 #移動距離 children [ Shape { geometry Box { #直方体 size 0.0005 0.006 0.017 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] }
#視点を設定する Viewpoint { position 0 10 10 #視点の位置 orientation 1 0 0 -0.78539816 #視線の方向 }
#グループ化する #↓ここからグループ化 DEF Obj7 Group { children [ Transform { translation -0.0475 0.017 0 #移動距離 children [ #形状を生成する(コンテナ本体) Shape { geometry Box { #直方体 size0.022 0.015 0.016 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0 0.7 0 #色 } } } #グループ化する #↓ここからグループ化 DEF Obj6 Group { children [ #形状を生成する(コンテナ文字1/2) Transform { translation 0 0.003 0.008 #移動距離 children [ Shape { geometry Text { #文字 string ["GAGAARIN"] fontStyle FontStyle { justify "MIDDLE" style "BOLD" size 0.004 } } appearance Appearance { material Material { diffuseColor 0 0 0 #色 } } } ] } ] } #↑ここまでグループ化(Obj6) #グループ化したものを使う(コンテナ文字2/2) Transform { children USE Obj6 center 0 0 0 #回転中心 rotation 0 1 0 3.1415926 #回転軸と角度 } #グループ化する #↓ここからグループ化 DEF Obj5 Group { children [ #形状を生成する(コンテナ脚部1/4) Transform { translation -0.009 -0.008 -0.006 #移動距離 children [ Shape { geometry Box { #直方体 size 0.004 0.001 0.004 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0 0.7 0 #色 } } } ] } #形状を生成する(コンテナ脚部2/4) Transform { translation -0.009 -0.008 0.006 #移動距離 children [ Shape { geometry Box { #直方体 size 0.004 0.001 0.004 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0 0.7 0 #色 } } } ] } ] } #↑ここまでグループ化(Obj5) #グループ化したものを使う(コンテナ脚部3/4、4/4) Transform { children USE Obj5 center 0 0 0 #回転中心 rotation 0 1 0 3.1415926 #回転軸と角度 } ] } ] } #↑ここまでグループ化(Obj7) #グループ化したものを使う(コンテナ2/5) Transform { children USE Obj7 translation 0.023 0 0 #移動距離 } #グループ化したものを使う(コンテナ3/5) Transform { children USE Obj7 translation 0.046 0 0 #移動距離 } #グループ化したものを使う(コンテナ4/5) Transform { children USE Obj7 translation 0.069 0 0 #移動距離 } #グループ化したものを使う(コンテナ5/5) Transform { children USE Obj7 translation 0.092 0 0 #移動距離 }