VRML虚拟现实开发文档(含源代码)37.docx

上传人:牧羊曲112 文档编号:1665171 上传时间:2022-12-13 格式:DOCX 页数:37 大小:4.62MB
返回 下载 相关 举报
VRML虚拟现实开发文档(含源代码)37.docx_第1页
第1页 / 共37页
VRML虚拟现实开发文档(含源代码)37.docx_第2页
第2页 / 共37页
VRML虚拟现实开发文档(含源代码)37.docx_第3页
第3页 / 共37页
VRML虚拟现实开发文档(含源代码)37.docx_第4页
第4页 / 共37页
VRML虚拟现实开发文档(含源代码)37.docx_第5页
第5页 / 共37页
点击查看更多>>
资源描述

《VRML虚拟现实开发文档(含源代码)37.docx》由会员分享,可在线阅读,更多相关《VRML虚拟现实开发文档(含源代码)37.docx(37页珍藏版)》请在三一办公上搜索。

1、虚拟现实开发文档罗维030913501. 功能概述运用vrml语言构造了一个虚拟现实世界。运动物体包括气球,火车,汽车,交通灯等,静止物体包括山脉,树林,房屋,人物,花草,电话亭,国旗,座椅,广告牌,雨伞等,另外还包含背景和声音。2. 使用说明2.1广告牌截图:程序:#VRML V2.0 utf8Transform translation 0.0 0.0 0.0 #背景颜色children Transform translation0.0 0.0 0children #创建广告牌造型Shape appearance Appearancematerial Material diffuseColo

2、r 0.2 0.3 0.3 geometry Box #广告牌size 12 6.5 0.2 Transform translation0.0 0.0 -0.02children Shape appearance AppearancetextureImageTexture urladvertisement.png material Material diffuseColor 0.0 0.0 0.0 geometry Box size 11 5.6 0.4 #广告屏幕DEF leg Transform #广告柱子translation 5 -4 0.1scale 0.04 0.04 0.04 c

3、hildrenShape # Shape 模型节点appearance Appearancematerial Material #空间物体造型外观diffuseColor 0.2 0.3 0.3 #一种材料的漫反射颜色 geometry Cylinder #柱体节点radius 2.0 #圆柱体半径height 100.0 #圆柱体高top TRUE #圆柱体有顶#bottom TRUE #圆柱体有底bottom FALSEside TRUE #圆柱体有曲面Transform #椅子腿translation -10 0 0 children USE leg2.2热气球截图:程序:#VRML V

4、2.0 utf8Group children BackgroundskyColor0.2 0.5 0.6#创建月球造型Transformtranslation 0 0 0.0scale 1 1 1 children Shape #银白颜色appearance AppearancetextureImageTexture urlballoon.png material Material #空间物体造型外观 diffuseColor 0.5 0.5 0.7 #一种材料的漫反射颜色ambientIntensity 0.4 #多少环境光被该表面反射specularColor 0.8 0.8 0.9 #物

5、体镜面反射光线的颜色shininess 0.20 #造型外观材料的亮度 geometry Sphere #球体radius 4 Transformtranslation 0 -4 0.0scale 1 0.6 0.6 children Shape appearance AppearancetextureImageTexture urlcolor.png material Material #空间物体造型外观 diffuseColor 0.3 0.2 0.0 #一种材料的漫反射颜色ambientIntensity 0.4 #多少环境光被该表面反射specularColor 0.7 0.7 0.6

6、 #物体镜面反射光线的颜色shininess 0.2 #造型外观材料的亮度 geometry Cylinder #潜艇舰桥(嘹望塔)radius 1.0height 3.0side TRUEtopTRUEbottom TRUE 热气球运动程序:#VRML V2.0 utf8DEFfly1 Transform #引入月球造型children Inlineurl balloon.wrlDEFTime1 TimeSensor #时间传感器cycleInterval 32loop TRUEDEFflyinter1 PositionInterpolator #移动位置节点key #相对时间的逻辑值0.0

7、,0.083,0.166,0.252,0.332,0.412,0.496,0.581,0.664,0.747,0.83,0.913,1.0keyValue #空间坐标的位置值与相对时间的逻辑值 0 0 -20, 6.6 0 -15, 13.2 0 -9, 20 0 0, 13.2 0 9, 6.6 0 15 0 0 20 -6.6 0 15 -13.2 0 9 -20 0 0 -13.2 0 -9 -6.6 0 -15 0 0 -20 ROUTE Time1.fraction_changedTO flyinter1.set_fractionROUTE flyinter1.value_chang

8、ed TOfly1.set_translation2.3国旗截图:程序:#VRML V2.0 utf8Group children Transform translation -22 -3 22scale 0.10.1 0.1 children Transform children Shape appearance Appearance texture ImageTexture url flag.gif geometry Box size 27 0.1 27 Transform translation 0 15 0 children Shape appearance Appearance te

9、xture ImageTexture url flagbase.gif geometry Cylinder radius 0.2 bottom TRUE top TRUE height 30 side TRUE Transform children Shape appearance Appearance texture ImageTexture url flagbase.gif geometry Cylinder radius 2.0 bottom TRUE top TRUE height 1.0 side TRUE Transform translation 4 28 0 scale2 2

10、2 children Shape appearance Appearance texture ImageTexture url china.gif geometry Box size 4.0 2.0 0.01 Viewpoint orientation 0 1 0 1.2 position -15 -2 252.4公共汽车截图:程序:#VRML V2.0 utf8DEF Bus Transform childrenDEF body Shape appearanceAppearance materialDEF LtGray_Color Material ambientIntensity0.25d

11、iffuseColor0.70213 0.70213 0.70213textureImageTexture urlbus_side.jpggeometryIndexedFaceSet coordCoordinate point 1.7909 0 -7.67,1.7909 0 7.6904,1.7909 1.982 7.6904,1.7909 3.964 7.1949,1.7909 3.964 -7.1745,1.7909 3.4685 -7.67,-1.8015 0 -7.67,-1.8015 0 7.6904,-1.8015 1.982 7.6904,-1.8015 3.964 7.1949

12、,-1.8015 3.964 -7.1745,-1.8015 3.4685 -7.67 coordIndex 0, 5, 4, 2, -1, 0, 2, 1,-1, 4, 3, 2, -1, 11, 6, 7,8, -1, 9, 10, 11, 8, -1 texCoordTextureCoordinate point 0.0077066 0.017324,0.99741 0.017324,0.99741 0.49809,0.96549 0.97886,0.039633 0.97886,0.0077066 0.85867,0.0077066 0.017324,0.99741 0.017324,

13、0.99741 0.49809,0.96549 0.97886,0.039633 0.97886,0.0077066 0.85867 DEF front01 Shape appearanceAppearance materialUSE LtGray_ColortextureImageTexture urlbus_front.jpggeometryIndexedFaceSet coordCoordinate point 1.7909 0 7.6904,1.7909 1.982 7.6904,1.7909 3.964 7.1949,-1.8015 0 7.6904,-1.8015 1.982 7.

14、6904,-1.8015 3.964 7.1949 coordIndex 3, 0, 1, 4, -1, 4, 1, 2,5, -1 texCoordTextureCoordinate point 0.93614 0.018577,0.93614 0.48085,0.93614 0.97202,0.072481 0.018577,0.072481 0.48085,0.072481 0.97202 DEF top01 Shape appearanceAppearance materialUSE LtGray_ColorgeometryIndexedFaceSet coordCoordinate

15、point 1.7909 3.964 7.1949,1.7909 3.964 -7.1745,-1.8015 3.964 7.1949,-1.8015 3.964 -7.1745 coordIndex 2, 0, 1, 3, -1 DEF back01 Shape appearanceAppearance materialUSE LtGray_ColorgeometryIndexedFaceSet coordCoordinate point 1.7909 0 -7.67,1.7909 3.964 -7.1745,1.7909 3.4685 -7.67,-1.8015 0 -7.67,-1.80

16、15 3.964 -7.1745,-1.8015 3.4685 -7.67 coordIndex 4, 1, 2, 5, -1, 5, 2, 0,3, -1 translation0.00532 0 -0.010212.5汽车截图:程序:#VRML V2.0 utf8Background #空间背景中,空中无颜色,即黑色。topUrl cloud.jpg #顶部frontUrl cloud.jpg #前面 backUrl cloud.jpg #后面leftUrl cloud.jpg #左面rightUrl cloud.jpg #右面bottomUrl water.jpg#底部DEF car T

17、ransform rotation 0 1 0 1.57 children Transform translation 0 0 3 rotation 1 0 0 1.57 children Shape appearance Appearance textureImageTexture urltire.png material Material diffuseColor .1 .1 .1 geometry Cylinder radius 1 height .5 Transform translation 0 0 -3 rotation 1 0 0 1.57 children Shape appe

18、arance Appearance textureImageTexture urltire.png material Material diffuseColor .1 .1 .1 geometry Cylinderradius 1 height .5 Transform translation 10 0 3 rotation 1 0 0 1.57 children Shape appearance Appearance textureImageTexture urltire.png material Material diffuseColor .1 .1 .1 geometry Cylinde

19、r radius 1 height .5 Transform translation 10 0 -3 rotation 1 0 0 -1.57 children Shape appearance Appearance textureImageTexture urltire.png material Material diffuseColor .1 .1 .1 geometry Cylinder radius 1 height .5 #车轮 Transform translation 6 2 0 children Shape appearance Appearance textureImageT

20、exture urlcar_side.png material Material geometry Box size 16 3 8 Transform translation 6.8 4 0 children Shape appearance Appearance textureImageTexture urlblack.png material Material geometry Box size 14 3 7 #车身 Transform translation -2 3 -3 children Shape appearance Appearance material Material di

21、ffuseColor 1 1 1 geometry Sphereradius .5 Transform translation -2 3 3 children Shape appearance Appearance material Material diffuseColor 1 1 1 geometry Sphereradius .5 #车灯Transform translation 0 2 2 rotation 0 1 0 1.571 children Shape appearance Appearance textureImageTexture urlcar_front.png mate

22、rial Material geometry Box size 0.01 3 8 #车正面Transform translation 0 4.5 0.2 rotation 0 1 0 1.571 children Shape appearance Appearance textureImageTexture urlglass.png material Material geometry Box size 0.01 1.5 6.5 #车窗户Transform translation 0 4.5 -13.8 rotation 0 1 0 1.571 children Shape appearanc

23、e Appearance textureImageTexture urlglass.png material Material geometry Box size 0.01 1.5 6.5 #车窗户 后面Transform translation 3.55 4.5 -7 rotation 0 0 1 1.571 children Shape appearance Appearance textureImageTexture urlglass.png material Material geometry Box size 1.5 0.01 13 #车窗户 侧面Transform translat

24、ion -3.5 4.5 -7 rotation 0 0 1 1.571 children Shape appearance Appearance textureImageTexture urlglass.png material Material geometry Box size 1.5 0.01 13 #车窗户 侧面2.6椅子截图:程序:#VRML V2.0 utf8Transform translation0.0 0.0 -0.02children Shape appearance AppearancetextureImageTexture urlchair_wood.jpg mate

25、rial Material diffuseColor 0.2 0.3 0.4 geometry Box size 11 5.6 0.3 #椅子背Transform translation0 -2.8 2.8rotation 1 0 0 1.571children Shape appearance AppearancetextureImageTexture urlchair_wood.jpg material Material diffuseColor 0.6 0.5 0.2 geometry Box size 11 5.6 0.3 #椅子坐DEF leg Transform translati

26、on5.3 -5.5 0.3 #椅子腿rotation 0 0 0 1.571children Shape appearance AppearancetextureImageTexture urlchair_wood.jpg material Material diffuseColor 0.6 0.5 0.2 geometry Cylinder radius 0.2 #圆柱体半径height 5.0 #圆柱体高top TRUE #圆柱体有顶#bottom TRUE #圆柱体有底bottom FALSEside TRUE #圆柱体有曲面Transform #椅子腿translation -10.

27、5 0 0 children USE legTransform #椅子腿translation 0 0 5 children USE legTransform #椅子腿translation -10.5 0 5 children USE leg2.7广告牌截图:程序:#VRML V2.0 utf8Transform translation0.0 0.0 0scale 5 5 5children DEF side1 Shape appearanceAppearance textureImageTexture urlflag_top.png materialDEF Blue_Color Mater

28、ial ambientIntensity0.197097diffuseColor0.1 0.2 0.3geometryExtrusion creaseAngle0.541052crossSection 1.00346 0.254188,1.11821 0.209842,1.19964 0.115829,1.22904 -0.006242,1.19964 -0.128314,1.11821 -0.222327,1.00346 -0.266673,1.00346 0.254188 orientation0 0 1 0scale1 1solidFALSEspine -0.197562 0 0,-0.

29、253993 0 0 Transform translation-1.1 3.3 0rotation 0 1 0 1.571children Shape appearance Appearance textureImageTexture urlflag_middle.png material Material diffuseColor 0.1 0.2 0.3 geometry Box size 2.5 3.5 0.1 #广告屏幕 Transform #广告柱子translation -1.1 0.1 0scale 0.1 0.1 0.1 childrenShape # Shape 模型节点ap

30、pearance Appearancematerial Material #空间物体造型外观diffuseColor 0.1 0.2 0.3 #一种材料的漫反射颜色 geometry Cylinder #柱体节点radius 1 #圆柱体半径height 30.0 #圆柱体高top TRUE #圆柱体有顶#bottom TRUE #圆柱体有底bottom FALSEside TRUE #圆柱体有曲面2.8房屋截图:程序:#VRML V2.0 utf8Group childrenDEF house1 Transform translation-22 12 -24children Shape appearance Appearance textureImageTexture urlhouse1.gifrepeatSTRUErepeatTTRUEgeometry Box size 20 30 202.9山脉截图:

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号