• xunixianshi3

    #VRML V2.0 utf8 #角度数 0 30 45 60 90 120 135 150 180 #弧度数 0 0.524 0.785 1.047 1.571 2.094 2.356 2.618 3.141 Background { skyColor [ 0.75 0.75 0.75 ] } Transform{ rotation 1.0 1.0 0.0 1.047 children[ Shape { appearance Appearance{ texture ImageTexture { url "p13.jpg" # repeatS TRUE # repeatT TRUE } } geometry Box { size 3.0 3.0 3.0 } } ] }

    0
    54
    446B
    2010-06-28
    0
  • xunixianshi2

    #VRML V2.0 utf8 #创建5×5的球矩阵 #在我们还未学习高级脚本的时候,对于复制大量对象的情况, #我们需要用这种比较原始的办法来实现 #Y方向坐标值为0,故为最中间一排 DEF sp2 Transform { translation -3.0 0.0 0.0 children [ #先定义一个基本的球体供后面调用 #这个球在屏幕的最左边 DEF sp Shape { appearance Appearance { material Material { diffuseColor 1.0 1.0 0.0 } } geometry Sphere { radius 0.4 } } #开始重用,请注意这里的思路: #先以一个球进行复制,做出一排, Transform { children [ USE sp #左起第二个 Transform { translation 1.5 0.0 0.0 children [ USE sp #最中间那个 Transform { translation 1.5 0.0 0.0 children [ USE sp #右起第二个 Transform { translation 1.5 0.0 0.0 children [USE sp #最右边那个 ] } ] } ] } ] translation 1.5 0.0 0.0 } ] } #再以排为单位进行复制,做出5排 Transform { translation 0.0 3.0 0.0 children [ USE sp2 #最上面一排 Transform { translation 0.0 -1.5 0.0 children [ USE sp2 #从上数第二排 Transform { translation 0.0 -3.0 0.0 children [ USE sp2 #从下面数第二排 Transform { translation 0.0 -1.5 0.0 children [USE sp2 #最下面一排 ] } ] } ] } ] } #注意理清坐标变换关系,要理解相对坐标

    0
    42
    1KB
    2010-06-28
    1
  • xunixianshi1

    #VRML V2.0 utf8 #创建模型 Shape { # Shape 模型节点 appearance Appearance{ material Material { #空间物体造型外观 diffuseColor 1.0 1.0 1.0 #一种材料的漫反射颜色 transparency 0.7 #物体的透明度 } } geometry Box { size 20 8 0.8 #透明板 } } #创建文字 Shape { # Shape 模型节点 appearance Appearance{ material Material { #空间物体造型外观 diffuseColor 1.0 0.0 0.0 #一种材料的漫反射颜色 } } geometry Text { string [ "Hello", #不同的行用逗号隔开 "My name is VRML" ] fontStyle FontStyle{ family "typewriter" # size 2.0 style "BOLDITALIC" justify[ "MIDDLE" #中间 ] } } }

    0
    58
    912B
    2010-06-28
    1
  • xunishangchuan

    #VRML V2.0 utf8 #设置天空背景 Background { skyColor [0.5 0.6 0.8, 0.6 0.7 0.9 1.0 1.0 1.0] skyAngle [1.309 1.571]} #利用群节点将灯变成一个整体,以便其它地方调用 Group { children [ #灯的吊杆 Shape { appearance Appearance { material Material { diffuseColor 0 0 0 specularColor 1 0.60 0.50 } } geometry Cylinder { radius 0.04 height 2.0 } } Transform { #在灯内部的局部坐标系中,将灯与灯罩向下移动移动的距离,以得到正确的效果 translation 0.0 -1.48 0.0 children [ #灯罩 Shape { appearance Appearance { material Material { diffuseColor 0 0 0 specularColor 1 1 1 emissiveColor .65 .65 0 ambientIntensity 0 shininess 0.32 transparency 0.50 #设置一定的透明度 } } geometry Cone { bottom TRUE #可以尝试将其设为FASLE,看看有什么变化 height 1.0 bottomRadius 1.5 } } Transform { #在局部坐标系中,向下移动0.5个单位 translation 0.0 -0.5 0.0 children [ #灯泡 Shape { appearance Appearance { material DEF col Material { diffuseColor 1 1 1} } geometry Sphere { radius 0.6} } ] } ] } ] } DEF clock TimeSensor { cycleInterval 8.0 loop TRUE } DEF path ColorInterpolator { key [0 0.15 0.3 0.45 0.6 0.75 0.90 1.0] keyValue [1.0 0.0 0.0, 0.5 0.0 0.0, 1.0 1.0 0.0, 0.0 1.0 0.0, 0.0 1.0 1.0, 0.0 0.0 1.0, 1.0 0.0 1.0, 1.0 1.0 1.0, ] } ROUTE clock.fraction_changed TO path.set_fraction ROUTE path.value_changed TO col.diffuseColor

    0
    61
    2KB
    2010-06-28
    9
  • xunixianshijishu

    #VRML V2.0 utf8 Background{ frontUrl "P04.jpg" } #背景 Anchor { url"tea.co" children [ Shape { appearance Appearance { material Material { diffuseColor 1.0 1.0 0.2 }} geometry Text { string [ " Go to Cult3D "] } } ] } #显示字符

    0
    53
    292B
    2010-06-28
    1
关注 私信
上传资源赚积分or赚钱