#VRML V2.0 utf8 #tetwq2.wrl #--------------------------------------- #設定 #--------------------------------------- #視点を設定する Viewpoint { position 0 -100 100 #視点の位置 orientation 1 0 0 0.78539816 #視線の方向 } #--------------------------------------- #線路部品 #--------------------------------------- #枕木(L5) PROTO Com_Sleeper1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Transform { children [ Shape { geometry Box { #直方体 size 1.5 16 1.5 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0.5 0 0 #色 } } } ] translation 0 0 -2.75 } ] translation IS position } #↑ここまで } #--------------------------------------- #枕木2個(L10) PROTO Com_Sleeper2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Sleeper1{ position -2.5 0 0 } Com_Sleeper1{ position 2.5 0 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #枕木4個(L20) PROTO Com_Sleeper4 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Sleeper2{ position -5 0 0 } Com_Sleeper2{ position 5 0 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #枕木8個(L40) PROTO Com_Sleeper8 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Sleeper4{ position -10 0 0 } Com_Sleeper4{ position 10 0 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #枕木16個(L80) PROTO Com_Sleeper16 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Sleeper8{ position -20 0 0 } Com_Sleeper8{ position 20 0 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #枕木32個(L160) PROTO Com_Sleeper32 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Sleeper16{ position -40 0 0 } Com_Sleeper16{ position 40 0 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #ジョイント PROTO Com_Joint1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Transform { children [ Shape { geometry Box { #直方体 size 5 0.1 1 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0.5 0.5 0 #色 } } } ] translation 0 0 -1 } ] translation IS position } #↑ここまで } #--------------------------------------- #ジョイント2組 PROTO Com_Joint2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Joint1{ position 0 -0.35 0 } Com_Joint1{ position 0 0.35 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #レール PROTO S124_Railpart1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 124 0.6 1.5 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0.5 0.5 0 #色 } } } ] translation IS position } #↑ここまで } PROTO S124_Railpart2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 124 1 0.5 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0.5 0.5 0 #色 } } } ] translation IS position } #↑ここまで } PROTO S124_Rail [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ S124_Railpart1{ position 0 0 -0.75 } S124_Railpart2{ position 0 0 -1.75 } ] translation IS position } #↑ここまで } #--------------------------------------- #線路S124 #--------------------------------------- PROTO S124 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ #枕木 Com_Sleeper8{ position -40 0 0 } Com_Sleeper8{ position 0 0 0 } Com_Sleeper8{ position 40 0 0 } #線路 S124_Rail{ position 0 -4.8 0 } S124_Rail{ position 0 4.8 0 } #ジョイント Com_Joint2{ position -62 -4.8 0 } Com_Joint2{ position 62 4.8 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #車輪部品 #--------------------------------------- #車輪本体 PROTO Com_Wheel1part1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Cylinder { #円柱 height 1 #厚さ radius 2.5 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #フランジ PROTO Com_Wheel1part2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Cylinder { #円柱 height 0.5 #厚さ radius 3 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #車軸 PROTO Com_Wheel1part3 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Cylinder { #円柱 height 8 #厚さ radius 1 #半径 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #車輪 #--------------------------------------- PROTO Com_Wheel1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Wheel1part1{ position 0 -5 2.5 } Com_Wheel1part2{ position 0 -4.25 2.5 } Com_Wheel1part3{ position 0 0 2.5 } Transform { children [ Com_Wheel1part1{ position 0 -5 2.5 } Com_Wheel1part2{ position 0 -4.25 2.5 } ] center 0 0 0 #回転中心 rotation 0 0 1 3.1415926 #回転軸と角度 } ] translation IS position } #↑ここまで } #--------------------------------------- #車輪2組 #--------------------------------------- PROTO Com_Wheel2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Wheel1{ position -7 0 0 } Com_Wheel1{ position 7 0 0 } ] translation IS position } #↑ここまで } #--------------------------------------- #車体部品 #--------------------------------------- #車体中央 PROTO KOKI10000_FRAMEpart1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 118 14 1 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #車体側面1/3 PROTO KOKI10000_FRAMEpart2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 21.5 1.5 2 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #↓車体側面2/3 PROTO KOKI10000_FRAMEpart3 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry IndexedFaceSet { coord Coordinate { point [ -10 -0.75 0, 10 -0.75 0, 10 -0.75 -5, -10 -0.75 -2 -10 0.75 0, 10 0.75 0, 10 0.75 -5, -10 0.75 -2 ] } 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 ] solid FALSE } } ] translation IS position } #↑ここまで } #--------------------------------------- #車体側面3/3 PROTO KOKI10000_FRAMEpart4 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 35 1.5 5 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #車体端面 PROTO KOKI10000_FRAMEpart5 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 0.5 17 6 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0 0 0.5 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #車体 #--------------------------------------- PROTO KOKI10000_FRAME [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ KOKI10000_FRAMEpart1{ position 0 0 8 } KOKI10000_FRAMEpart2{ position -48.25 -7.75 7.5 } KOKI10000_FRAMEpart2{ position -48.25 7.75 7.5 } KOKI10000_FRAMEpart3{ position -27.5 -7.75 8.5 } KOKI10000_FRAMEpart3{ position -27.5 7.75 8.5 } Transform { children [ KOKI10000_FRAMEpart2{ position -48.25 -7.75 7.5 } KOKI10000_FRAMEpart2{ position -48.25 7.75 7.5 } KOKI10000_FRAMEpart3{ position -27.5 -7.75 8.5 } KOKI10000_FRAMEpart3{ position -27.5 7.75 8.5 } ] center 0 0 0 #回転中心 rotation 0 0 1 3.1415926 #回転軸と角度 } KOKI10000_FRAMEpart4{ position 0 -7.75 6 } KOKI10000_FRAMEpart4{ position 0 7.75 6 } KOKI10000_FRAMEpart5{ position 58.75 0 11.5 } ] translation IS position } #↑ここまで } #--------------------------------------- #コンテナ部品 #--------------------------------------- #↓コンテナ本体 PROTO Com_Contpart1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 22 16 15 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0 0.7 0 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #文字 PROTO Com_Contpart2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Transform { children [ Shape { geometry Text { #文字 string ["GAGAARIN"] fontStyle FontStyle { justify "MIDDLE" style "BOLD" size 3 } } appearance Appearance { material Material { diffuseColor 0 0 0 #色 } } } ] center 0 0 0 #回転中心 rotation 1 0 0 1.5707963 #回転軸と角度 } ] translation IS position } #↑ここまで } #--------------------------------------- #脚 PROTO Com_Contpart3 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Shape { geometry Box { #直方体 size 3.8 3.8 1 #長さ、巾、高さ } appearance Appearance { material Material { diffuseColor 0 0.7 0 #色 } } } ] translation IS position } #↑ここまで } #--------------------------------------- #コンテナ #--------------------------------------- PROTO Com_Cont [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Contpart1{ position 0 0 8.5 } Com_Contpart2{ position 0 -8.1 11.5 } Com_Contpart3{ position -9 -6 0.5 } Com_Contpart3{ position -9 6 0.5 } Transform { children [ Com_Contpart2{ position 0 -8.1 11.5 } Com_Contpart3{ position -9 -6 0.5 } Com_Contpart3{ position -9 6 0.5 } ] center 0 0 0 #回転中心 rotation 0 0 1 3.1415926 #回転軸と角度 } ] translation IS position } #↑ここまで } #--------------------------------------- #コキ10000 #--------------------------------------- PROTO KOKI10000 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { children [ Com_Wheel2{ position -44 0 0 } Com_Wheel2{ position 44 0 0 } KOKI10000_FRAME{ position 0 0 0 } Com_Cont{ position -46 0 8.5 } Com_Cont{ position -23 0 8.5 } Com_Cont{ position 0 0 8.5 } Com_Cont{ position 23 0 8.5 } Com_Cont{ position 46 0 8.5 } ] translation IS position } #↑ここまで } #--------------------------------------- #線路配置 #--------------------------------------- S124{ position -62 0 0 } S124{ position 62 0 0 } #--------------------------------------- #車両配置 #--------------------------------------- #KOKI10000{ # position 0 0 0 #} #--------------------------------------- #移動 #--------------------------------------- #動きの元を決める DEF Move_In TimeSensor { loop TRUE cycleInterval 10 stopTime -1 } #模型の動きを決める DEF Move_Out Transform { children KOKI10000 {} } #動きの元と模型の動きの関係を決める DEF Move_Rel PositionInterpolator { key [0, 0.25, 0.5, 0.75, 1] keyValue [0 0 0, -50 0 0, 0 0 0, 50 0 0, 0 0 0] } #以上を関連付ける ROUTE Move_In.fraction_changed TO Move_Rel.set_fraction ROUTE Move_Rel.value_changed TO Move_Out.set_translation