復刻版 ウェブコラム:1997年「VRML1.0入門」(6)「つくってみよう!VRML「小豆大明神」
»
復刻版 ウェブコラム:1997年1月「VRML1.0入門」(6)「つくってみよう!VRML「小豆大明神」
少しだけ複雑な記述のVRMLを作ってみましょう。
テキストエディタでこの通りに入力し、「HONZON.wrl」というファイル名で保存してください。
甘党の御本尊(?)「小豆大明神」を表示できます。
もし、あなたが辛党ならば、毎日これを拝み、甘党になりましょう。
甘いものを食べないなんて、人生の半分を損しているようなものです。
さて、このワールドファイルを埋め込んだHTMLファイルを、ローカルで開いてみてください。
うまく表示できましたか?
#VRML V1.0 ascii
DEF BackgroundColor Info{
string "0 0 0"
}
Separator{
#頭あずき
Separator{
Transform{ translation 0.5 0 0 }
Group{
PointLight{
on TRUE
intensity 0.7
color 0.87 0.78 0.7
location 1 3 1
}
Transform{ translation -1 0 0 }
Material{
diffuseColor 0.5 0 0.1
ambientColor 0.1 0.1 0.2
specularColor 0.8 0.6 0.4
shininess 0.1
transparency 0.1
}
Sphere{
radius 1
}
Transform{ translation 1 0 0 }
Material{
diffuseColor 0.5 0 0.1
ambientColor 0.1 0.1 0.2
specularColor 0.8 0.6 0.4
shininess 0.1
transparency 0.1
}
Sphere{
radius 1
}
Rotation{
rotation 0 0 1 1.57
}
Transform{ translation 0 0.5 0 }
Material{
diffuseColor 0.5 0 0.1
ambientColor 0.1 0.1 0.2
specularColor 0.8 0.6 0.4
shininess 0.1
transparency 0.1
}
Cylinder{
radius 1
height 1
}
}
}
#胴体もなか
Group{
Separator{
Transform{ translation 2 -3 -1 }
Material{
diffuseColor 0.85 0.75 0.57
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 0.5
height 4
}
}
Separator{
Transform{ translation -2 -3 -1 }
Material{
diffuseColor 0.85 0.75 0.57
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 0.5
height 4
}
}
Separator{
Transform{ translation 2 -3 1 }
Material{
diffuseColor 0.85 0.75 0.57
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 0.5
height 4
}
}
Separator{
Transform{ translation -2 -3 1 }
Material{
diffuseColor 0.85 0.75 0.57
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 0.5
height 4
}
}
Separator{
Transform{ translation 0 -3 0 }
Material{
diffuseColor 0.85 0.75 0.57
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cube{
width 4
height 4
depth 3
}
}
Separator{
Transform{ translation 0 -3 0 }
Material{
diffuseColor 0.85 0.7 0.4
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cube{
width 5
height 4
depth 2
}
}
#台座たいこまん
WWWAnchor {
name "TAIKOMAN.htm"
description "Welcome to Hiuchi-Area in Ehime pref.
The Japanese Hotcake,TAIKOMAN, My Love."
Separator{
Transform{ translation 0 -6.5 0 }
Material{
diffuseColor 0.85 0.7 0.4
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 4
height 3
}
}
Separator{
Transform{ translation 0 -6.5 0 }
Material{
diffuseColor 0.63 0.47 0.27
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 4.3
height 0.3
}
}
}
#胴と台座
}
#左腕団子
Separator{
Rotation{
rotation 0 0 1 -0.61
}
Group{
Separator{
Transform{ translation -1.3 -4 0 }
Material{
diffuseColor 0.72 0.59 0.33
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 0.2
height 3
}
}
Separator{
Transform{ translation -1.3 -5.5 0 }
Material{
diffuseColor 0.9 0.9 0.9
ambientColor 0 0 0
emissiveColor 1 1 1
specularColor 1 1 1
shininess 0.8
transparency 0.2
}
Sphere{
radius 1.3
}
}
Separator{
Transform{ translation -1.3 -7 0 }
Material{
diffuseColor 0.9 0.9 0.9
ambientColor 0 0 0
emissiveColor 1 1 1
specularColor 1 1 1
shininess 0.8
transparency 0.2
}
Sphere{
radius 1.3
}
}
Separator{
Transform{ translation -1.3 -8.5 0 }
Material{
diffuseColor 0.9 0.9 0.9
ambientColor 0 0 0
emissiveColor 1 1 1
specularColor 1 1 1
shininess 0.8
transparency 0.2
}
Sphere{
radius 1.3
}
}
}
}
#右腕団子
Separator{
Rotation{
rotation 0 0 1 0.61
}
Group{
Separator{
Transform{ translation 1.3 -4 0 }
Material{
diffuseColor 0.72 0.59 0.33
ambientColor 0 0 0
shininess 0.5
transparency 0.1
}
Cylinder{
radius 0.2
height 3
}
}
Separator{
Transform{ translation 1.3 -5.5 0 }
Material{
diffuseColor 0.9 0.9 0.9
ambientColor 0 0 0
emissiveColor 1 1 1
specularColor 1 1 1
shininess 0.8
transparency 0.2
}
Sphere{
radius 1.3
}
}
Separator{
Transform{ translation 1.3 -7 0 }
Material{
diffuseColor 0.9 0.9 0.9
ambientColor 0 0 0
emissiveColor 1 1 1
specularColor 1 1 1
shininess 0.8
transparency 0.2
}
Sphere{
radius 1.3
}
}
Separator{
Transform{ translation 1.3 -8.5 0 }
Material{
diffuseColor 0.9 0.9 0.9
ambientColor 0 0 0
emissiveColor 1 1 1
specularColor 1 1 1
shininess 0.8
transparency 0.2
}
Sphere{
radius 1.3
}
}
}
}
#全体
}
>目次ページに戻る
SpecialPR