#VRML V2.0 utf8 #tetwo1.wrl #--------------------------------------- #設定 #--------------------------------------- #背景を設定する Background { groundColor 0.6 0.3 0.1 #地面の色 skyColor 0.5 0.8 1.0 #空の色 } #視点を設定する Viewpoint { #position 0.0 5.0 0.0 #視点の位置 #orientation 0.0 -1.0 0.0 0.0 position 0 10 10 #視点の位置 orientation 1 0 0 -0.78539816 #視線の方向 } #--------------------------------------- #線路部品 #--------------------------------------- #枕木(L5) PROTO Com_Sleeper1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Transform { translation 0 -0.00275 0 children [ Shape { geometry Box { #直方体 size 0.0015 0.0015 0.016 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0.5 0 0 #色 } } } #end Shape ] #end children } #end Transform ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #枕木2個(L10) PROTO Com_Sleeper2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Com_Sleeper1{ position -0.0025 0 0 } Com_Sleeper1{ position 0.0025 0 0 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #枕木4個(L20) PROTO Com_Sleeper4 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Com_Sleeper2{ position -0.005 0 0 } Com_Sleeper2{ position 0.005 0 0 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #枕木8個(L40) PROTO Com_Sleeper8 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Com_Sleeper4{ position -0.01 0 0 } Com_Sleeper4{ position 0.01 0 0 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #枕木16個(L80) PROTO Com_Sleeper16 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Com_Sleeper8{ position -0.02 0 0 } Com_Sleeper8{ position 0.02 0 0 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #枕木32個(L160) PROTO Com_Sleeper32 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Com_Sleeper16{ position -0.04 0 0 } Com_Sleeper16{ position 0.04 0 0 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #ジョイント PROTO Com_Joint1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Transform { translation 0 -0.001 0 children [ Shape { geometry Box { #直方体 size 0.005 0.001 0.0001 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0 #色 } } } ] #end children } #end Transform ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #ジョイント2組 PROTO Com_Joint2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Com_Joint1{ position 0 0 0.00035 } Com_Joint1{ position 0 0 -0.00035 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #レール PROTO S124_Railpart1 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Shape { geometry Box { #直方体 size 0.124 0.0015 -0.0006 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0 #色 } } } #end Shape ] #end children } #end Transform #↑ここまで } #end PROTO PROTO S124_Railpart2 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ Shape { geometry Box { #直方体 size 0.124 0.0005 -0.001 #長さ、高さ、巾 } appearance Appearance { material Material { diffuseColor 0.5 0.5 0 #色 } } } #end Shape ] #end children } #end Transform #↑ここまで } #end PROTO PROTO S124_Rail [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ S124_Railpart1{ position 0 -0.00075 0 } S124_Railpart2{ position 0 -0.00175 0 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #線路S124 #--------------------------------------- PROTO S124 [ field SFVec3f position 0 0 0 ] { #↓ここから Transform { translation IS position children [ #枕木 Com_Sleeper8{ position -0.04 0 0 } Com_Sleeper8{ position 0 0 0 } Com_Sleeper8{ position 0.04 0 0 } #線路 S124_Rail{ position 0 0 0.0048 } S124_Rail{ position 0 0 -0.0048 } #ジョイント Com_Joint2{ position -0.062 0 0.0048 } Com_Joint2{ position 0.062 0 -0.0048 } ] #end children } #end Transform #↑ここまで } #end PROTO #--------------------------------------- #線路配置 #--------------------------------------- S124{ position 0 0 0 }