vrml实例源代码

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.会动的摆球

#VRML utf8

Background {skyColor .6 .6 1}

Transform {translation 0 0

children [Shape {appearance Appearance { material Material{diffuseColor 0 1 1} }

geometry Box {size 10 1 1}}

]}

Transform {translation 4 0 0

children [Shape {appearance Appearance{

material Material {diffuseColor 1 0 1}

}geometry Box {size }} ]} Transform {translation -4 0 0

children [Shape {appearance Appearance{

material Material {diffuseColor 1 0 1}

}geometry Box {size }} ]}

Transform {translation 0 0

rotation 0 0 1

children [Shape {

appearance Appearance {material Material {

diffuseColor .5 0 1}}

geometry Cylinder {radius height }}]}

DEF hk Transform {

children [Group {children [

Transform {translation 0 0

children [Shape {appearance

Appearance {

material Material {diffuseColor 2 1 1}}

geometry Sphere {radius }

}]}

Transform {translation 0 0

children [Shape {appearance Appearance {

material Material {diffuseColor 0 .8 1}}

geometry Cylinder {radius height }

}]}

]}

]}

DEF left Transform {

translation 0 0

center 0 0

children [USE hk ]}

Transform {

translation 0 0

rotation 0 0 1 0

children [USE hk ]}

Transform {

translation 0 0

rotation 0 0 1 0

children [USE hk ]}

DEF right Transform {

translation 0 0

center 0 0

children [USE hk ]}

DEF time TimeSensor {

cycleInterval 1

loop TRUE enabled TRUE }

DEF z1

OrientationInterpolator {

key [0 1]

keyValue [

0 0 1 0,

0 0 1 ,

0 0 1 0,

0 0 1 0,

0 0 1 0,]}

DEF z2 OrientationInterpolator {

key [0 1]

keyValue [

0 0 1 0,

0 0 1 0,

0 0 1 0,

0 0 1 ,

0 0 1 0,]}

ROUTE TO

ROUTE TO

ROUTE TO

ROUTE TO

2.不用电的电风扇

#VRML utf8

Background {skyColor [1 1 ]}

DEF a Transform {

translation 0

children [

Shape {

appearance Appearance {

material Material {

diffuseColor 1 1 1}}

geometry Sphere {radius }}

Transform {translation 1 0 0

scale

center -1 0 0

rotation 0 0 1 0

children [

Shape {appearance Appearance {

material Material {

diffuseColor 0 0 1}}

geometry Sphere {radius 1}}]}

Transform {translation 1 0 0

scale

center -1 0 0

rotation 0 0 1

children [

Shape {

appearance Appearance {

material Material {

diffuseColor 0 1 0}}

geometry Sphere {radius 1}}]}

Transform {translation 1 0 0

scale

center -1 0 0

相关文档
最新文档