VRML虚拟现实开发文档_第1页
VRML虚拟现实开发文档_第2页
VRML虚拟现实开发文档_第3页
VRML虚拟现实开发文档_第4页
VRML虚拟现实开发文档_第5页
免费预览已结束,剩余39页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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

2、2Transform translationchildren Shape appearance Appearancetexture ImageTexture url ""material Material diffuseColorgeometry Box size 11 DEF leg Transform translation 5 -4 scale children Shape # Shapeappearance Appearance material Material diffuseColor geometry Cylinder #radius#height#top T

3、RUE#bottom TRUE bottom FALSE side TRUE# Transform#translation -10 0 0 children USE leg#广告屏幕#广告柱子模型节点#空间物体造型外观#一种材料的漫反射颜色柱体节点圆柱体半径圆柱体高圆柱体有顶#圆柱体有底圆柱体有曲面椅子腿热气球截图:程序:#VRML utf8Group children BackgroundskyColor)#创建月球造型Transform translation 0 0 scale 1 1 1childrenShape #appearance Appearance银白颜色texture Im

4、ageTexture url "")material Material diffuseColor # ambientIntensity specularColor # shininess #) ) geometry Sphere #radius 4) )Transformtranslation 0 -4scale 1childrenShape appearance Appearancetextureurl)material Material #空间物体造型外观一种材料的漫反射颜色#多少环境光被该表面反射物体镜面反射光线的颜色 造型外观材料的亮度球体ImageTexture

5、""空间物体造型外观diffuseColor # ambientintensity # specularColor # shininess # ) ) geometry Cylinder #radius height side TRUE top TRUE bottom TRUE ) ) )一种材料的漫反射颜色多少环境光被该表面反射 物体镜面反射光线的颜色造型外观材料的亮度潜艇舰桥(噫望塔)热气球运动程序:#VRML utf8引入月球造型#时间传感器#移动位置节点相对时间的逻辑值空间坐标的位置值与相对时间的逻辑值DEF flyl Transform #children Inl

6、ine url "")DEF Timel TimeSensor cycleinterval 32loop TRUE)DEF flyinterl Positioninterpolator key # keyValue #0 0 -20,0 -15,0 -9,20 0 0,0 9,0 150 0 200 15 0 9-20 0 00 -9 0 -150 0 -20 )ROUTE TOROUTE TO国旗截图:Group children Transform translation -22 -3 22scalechildren Transform children Shape a

7、ppearance Appearance texture ImageTexture url ""geometry Box size 27 27 Transform translation 0 15 0 children Shape appearance Appearance texture ImageTexture url "" geometry Cylinder radiusbottom TRUE top TRUE height 30 side TRUE Transform children Shape appearance Appearance te

8、xture ImageTexture url "" geometry Cylinder radiusbottom TRUEtop TRUE height side TRUE )Transform translation 4 28 0 scale 2 2 2 children Shape appearance Appearance texture ImageTexture url ""geometry Box size Viewpoint orientation 0 1 0position -15 -2 25公共汽车截图:程序:#VRML utf8DEF

9、Bus Transform children DEF body Shape appearance Appearance materialDEF LtGray_C010r Material ambientIntensity diffuseColor texture ImageTexture url "" geometry IndexedFaceSet coord point 0 ,Coordinate 0 ,coordIndex 0, 5, 4, 2,-1, 0, 2,1,-1,4, 3, 2,-1, 11, 6, 7, 8,-1, 9, 10, 11, 8,-1 texCo

10、ordTextureCoordinate point , DEF front01 Shape appearance Appearance materialUSE LtGray_C010rtextureImageTexture url "" geometry IndexedFaceSet coordCoordinate point 0 ,coordIndex 3, 0, 1, 4, -1, 4, 1, 2,5, -1 texCoord TextureCoordinate pointDEF top01 Shape appearance Appearance material U

11、SE LtGray_Color geometry IndexedFaceSet coordCoordinate point , ) coordindex 2, 0, 1, 3, -1 ) )DEF back01 Shape appearance Appearance material USE LtGray_Color ) geometry IndexedFaceSet coordCoordinate point 0 ,4, 1,2, 5, -1, 5, 2, 0,) coordindex 3, -1 ) translation)汽车 截图:程底:#VRML utf8Background#空间背

12、景中,空中无颜色,即黑色topUrl ""#顶部frontUrl ""#前面backUrl ""#后面leftUrl ""#左面rightUrl ""#右面bottomUrl""#底部)DEF car Transformrotation 0 1 0childrenTransformtranslation 0 0 3rotation 1 0 0children Shapeappearance Appearancetexture ImageTexture url "&q

13、uot;)material MaterialdiffuseColor ,1 .1 .1)geometry Cylinderradius 1height .5)Transformtranslation 0 0 -3rotation 1 0 0children Shapeappearance Appearancetexture ImageTexture url ""material Material diffuseColor .1 .1 .1geometry Cylinderradius 1 height .5Transformtranslation 10 0 3rotatio

14、n 1 0 0children Shapeappearance Appearancetexture ImageTexture url ""material MaterialdiffuseColor .1 .1 .1 geometry Cylinderradius 1height .5Transformtranslation 10 0 -3rotation 1 0 0children Shapeappearance Appearancetexture ImageTexture url ""material MaterialdiffuseColor .1 .

15、1 .1 geometry Cylinderradius 1height .5#车轮Transform translation 6 2 0 children Shape appearance Appearance texture ImageTexture url "" material Material geometry Box size 16 3 8Transformtranslation 4 0children Shapeappearance Appearancetexture ImageTexture url "" material Materia

16、l geometry Boxsize 14 3 7 #车身Transformtranslation -2 3 -3children Shapeappearance Appearancematerial Material diffuseColor 1 1 1geometry Sphereradius .5Transformtranslation -2 3 3children Shapeappearance Appearancematerial Material diffuseColor 1 1 1geometry Sphereradius .5车灯#车正面#Transformtranslatio

17、n 0 2 2rotation 0 1 0children Shapeappearance Appearancetexture ImageTexture url "" material Material geometry Box size 3 8 Transformtranslation 0rotation 0 1 0children Shapeappearance Appearancetexture ImageTexture url "" material Material geometry Box size)#车窗户)Transform transl

18、ation 0 rotation 0 1 0 children Shape appearance Appearance texture ImageTexture url "" material Material geometry Box size 后面#车窗户Transform translation -7 rotation 0 0 1 children Shape appearance Appearance texture ImageTexture url "" material Material geometry Box size 13侧面#车窗户T

19、ransform translation -7 rotation 0 0 1 children Shape appearance Appearance texture ImageTexture url "" material Material geometry Box size 13侧面#车窗户椅子 截图:程底:#VRML utf8Transform translation children Shape appearance Appearancetexture ImageTexture url ""material Material diffuseCol

20、or geometry Box size 11#椅子背Transform translation 0 rotation 1 0 0 children Shape appearance Appearancetexture ImageTexture url ""material Material diffuseColor #椅子坐geometry Box size 11DEF leg Transform translation# 椅子腿rotation 0 0 0children Shape appearance Appearancetexture ImageTexture u

21、rl ""material Material diffuseColor 圆柱体半径圆柱体高圆柱体有顶圆柱体有底圆柱体有曲面geometry Cylinder radius #height#top TRUE#bottom TRUE # bottom FALSE side TRUE# Transform#translation 0 0 children USE leg Transform#translation 0 0 5 children USE leg Transform#translation 0 5 children USE leg 广告牌截图:椅子腿椅子腿椅子腿程序:

22、#VRML utf8Transform translation 0scale 5 5 5children DEF side1 Shape appearance Appearance texture ImageTexture url ""material DEF Blue_C010r Material ambientIntensity diffuseColor geometry Extrusion creaseAngle crossSection , orientation 0 0 1 0 scale 1 1 solid FALSE spine 0 0, 0 0 Transf

23、orm translation 0 rotation 0 1 0children Shape appearance Appearancetexture ImageTexture url ""material Material diffuseColor geometry Box size#广告屏幕Transform#广告柱子translation 0 scale children模型节点#空间物体造型外观#一种材料的漫反射颜色柱体节点圆柱体半径圆柱体高圆柱体有顶圆柱体有底圆柱体有曲面Shape # Shapeappearance Appearance material Mat

24、erial diffuseColorgeometry Cylinder #radius 1#height#top TRUE#bottom TRUE # bottom FALSE side TRUE# 房屋 截图:程底:#VRML utf8Group childrenDEF housel Transform translation - 22 12 -24 children Shape appearance Appearance textureImageTexture url""r即eatSTRUEr即eatTTRUE geometry Box size 20 30 20 山脉

25、截图:程序:#VRML utf8Background skyColor #创建山脉造型模型节点Shape # Shapeappearance Appearance""texture ImageTexture urlmaterial Material #diffuseColor #空间物体造型外观 一种材料的漫反射颜色geometry ElevationGrid #海拔珊格节点xDimension 10 #X-Z水平面zDimension 40xSpacing #X-Z水平面上间距zSpacingccw TRUEsolid TRUEheight #海拔珊格高度阵列crease

26、Angle)路灯截图:程序:#VRML utf8DEF B_lamp1 Transform children DEF Light_Post Shape appearance Appearance material Material ambientIntensity diffuseColor ) )geometry Extrusion beginCap FALSEcreaseAnglecrossSection ,endCapTRUEorientation 0 0 1 0scale, 1 1, 1 1, 1 1, 1 1, 1 1, 1 1, 1 1, 1 1, 1 1, 1 1, 1 1, 1

27、1, 1 1,1 1, ,6 6,6 6 solidTRUEspine 0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) ) )交通灯截图:程序:#VRML utf8Shape appearance Appearance material Material diffuseColor 1 1 1)geometry Box size 3 7)Shape appearance Appearance material DEF YellowLight Material diffuseColor 0)geometry Sphere )#一种材

28、料的漫反射颜色#交通灯面板#黄灯#一种材料的漫反射颜色#交通灯,球体Transform translation 0 2 0childrenShape appearance Appearance #红灯material DEF RedLight Material diffuseColor 0 0geometry Sphere Transform translation 0 -2 0childrenShape appearance Appearance material DEF GreenLight Material diffuseColor 0 0 geometry Sphere DEF Tim

29、er TimeSensor cycleInterval 2loop TRUEDEF RedCI ColorInterpolator key 0,#绿灯#时间传感器#颜色插补器红灯#相对时间间隔值1 keyValue 0 0, 1 0 0, 1 0 0, 0 0, 0 0, 1 0 0, 1 0 0 DEF GreenCI ColorInterpolator key 0,#颜色插补器绿灯#颜色变换值1keyValue 0 0,0 0,0 1 0,0 1 0,0 0, 0 0#颜色变换值DEF YellowCI Colorinterpolator key 0,#颜色插补器黄灯1keyValue 0

30、,0,1 1 0,1 1 0,0,0)Transform translation 0 -11 0childrenShape appearance Appearance material Material diffuseColor)geometry Cylinder height 15radius)Transform translation 0 0childrenShape appearance Appearance material Material )geometry Cylinder radius 2)#Transform # translation 0 -20 0#children# S

31、hape # appearance Appearance # material Material # diffuseColor 0 0# )# )# geometry Box # size 40 1 40# )# )#)#Viewpoint # orientation 1 0 0# position 0 15 60# )ROUTE TOROUTE TO较通灯柱#交通灯底座#颜色变换值ROUTE TOROUTE TOROUTE TOROUTE TO人物截图:程序:#VRML utf8Group( childrenBillboard( childrenShape(appearance Appear

32、ance(texture ImageTexture( url ""geometry Box(size 0电话亭截图:PHONE程底:#VRML utf8DEF phone Transform translation children Shape appearance Appearance texture ImageTexture url "" material Material diffuseColor geometry Box size 11#电话亭门 Transform#电话亭四壁translation 0 rotation 0 1 0 childr

33、en USE phone Transform#电话亭四壁translation 0 rotation 0 1 0 children USE phone Transform#电话亭四壁translation 0 0 rotation 0 0 0 children USE phone Transform translation rotation 1 0 0 children Shape appearance Appearancetexture ImageTexture url ""material Material diffuseColorgeometry Box size#电

34、话亭顶) ) )Transform translation 0 rotation 0 0 0 children Shape appearance Appearance texture ImageTexture url "" ) material Material diffuseColor ) )电话亭招牌geometry Box size#) ) )火车截图:程序:#VRML utf8PROTO Wagon Transform children DEF Top Shape # 火车顶部appearance Appearance material Material ) ) g

35、eometry IndexedFaceSet colorIndex 1,1,1 coordIndex 0, 5, 6,7, 8, 9, 4, 3, 2, 1, -1, 0, 1,2, 3, 4, -1, 9, 8,7, 6, 5 colorPerVertex FALSE convex FALSE color Color color , 1 1 0 ) coord Coordinate point -35 15 8,- 35 17 4,- 35 18 0,- 35 17 -4,-35 15 -8,35 15 8,35 17 4,35 18 0,35 17 -4,35 15 -8 )DEF Sid

36、es Shape appearance Appearance texture ImageTexture url "")geometry IndexedFaceSet coordIndex 0, 1, 3, 2, -1, 5, 4, 6, 7 texCoordIndex 0, 1, 2, 3, -1, 0, 1, 2, 3 coord Coordinate point -35 0 8, 35 0 8, -35 15 8, 35 15 8, -35 0 -8, 35 0 -8, -35 15 -8, 35 15 -8 )texCoord TextureCoordinate po

37、int 0 0, 1 0, 1 1, 0 1 )DEF Ends1 Shape appearance Appearance texture ImageTexture url "")geometry IndexedFaceSet coordIndex 0, 2, 6, 4, -1, 1, 5, 7, 3 texCoordIndex 1, 2, 3, 0, -1, 0, 1, 2, 3 coord Coordinate point -35 0 8, 35 0 8, -35 15 8, 35 15 8, -35 0 -8, 35 0 -8, -35 15 -8, 35 15 -8

38、 )texCoord TextureCoordinate point 0 0, 1 0, 1 1, 0 1 )Wagon )Viewpoint position 0 0 100)树截图:程底:#VRML utf8DEF tree Group children DEF Planter Transform scale children Shape appearance Appearance material Material geometry IndexedFaceSet coord DEF PlanterCoordinates Coordinate point coordIndex 0, 1,

39、5, 4,-1,1, 2, 6, 5, -1,2, 3, 7, 6,-1,3, 0, 4, 7,-1,0, 8, 9, 1,-1,9, 10, 2, 1, -1,10, 11, 3, 2, -1,11, 8, 0, 3, -1,15, 14, 6, 7, -1,14, 13, 5, 6, -1,13, 12, 4, 5, -1,12, 15, 7, 4, -1,Shape appearance Appearance material Material diffuseColorgeometry IndexedFaceSet coord USE PlanterCoordinatescoordInd

40、ex 12, 13, 14, 15 )Transform #translationchildren USE PlanterBillboard axisOfRotationchildren Shape appearance Appearance texture ImageTexture url "" )geometry DEF TreeFace IndexedFaceSet coord Coordinate point coordIndex 0, 1,2, 3 texCoord TextureCoordinate point texCoordIndex 0, 1,2, 3 s

41、olid FALSE Transform children DEF Tree Billboard axisOfRotation children Shape appearance Appearance texture ImageTexture url "" geometry USE TreeFace 卡车 截图:程序:#VRML utf8Group children Group childrenShape appearance Appearance materialMaterial ambientintensity diffuseColor0 0specularColor0

42、 0emissiveColor0 0 0shininess transparency0)geometry IndexedFaceSet coordDEF a Coordinate point, )coordindex 12, 107, 13, -1, 13, 106, 12, -1, -1 creaseAngle1normalindextexCoordindex)Group childrenShape appearance Appearance materialMaterial ambientintensity0diffuseColor specularColor emissiveColor0

43、 0 0shininess transparency0)geometry DEF _2 IndexedFaceSet coord USE acoordIndex 26, 27, 70, -1, 21,28, 20,-1, 49, 30, 50,-1,28, 29, 20,-1, 30, 31, 50, -1, 70, 67, 26, -1, -1 creaseAngle1normalIndextexCoordIndex) ) Group childrenShape appearance Appearance materialMaterial ambientIntensity diffuseCo

44、lor specularColor emissiveColor0 0 0shininess transparency0)geometryDEF _3 IndexedFaceSet coordUSE acoordIndex 77, 33, 38, -1, 51, 52, 42, -1, 77, 38, 52,-1,77, 59, 33, -1, 42, 54, 51,-1, 52, 51, 77,-1, -1 creaseAngle1normalindextexCoordIndex) ) ) Group childrenShape appearance Appearance materialMa

45、terial ambientintensity diffuseColor0 0specularColor0 0emissiveColor0 0 0shininess transparency0) )geometryDEF _4 IndexedFaceSet coordUSE acoordIndex 66, 14, 106, -1, 12, 15, 69, -1, 15, 14, 66, -1, 66, 67, 69, -1, 106, 65, 66, -1, 68, 69, 70, -1,69, 68, 12, -1,66, 69, 15, -1, 67, 70, 69, -1,67, 66,

46、 65, -1, -1 creaseAngle1normalindextexCoordIndex) ) ) Group childrenShape appearance Appearance materialMaterial ambientintensity0diffuseColor specularColor emissiveColor0 0 0shininess transparency0) )geometryDEF _5 IndexedFaceSet coordUSE acoordindex 30, 16, 17, -1, 28, 22, 23, -1, 24, 25, 27, -1,2

47、2, 25, 24, -1, 18, 19, 21, -1, 17, 16, 19, -1, 17, 31, 30, -1, 23, 29, 28, -1, 27, 26, 24, -1, 24, 23, 22, -1, 21, 20, 18, -1, 19, 18, 17, -1, -1 creaseAngle1normalIndextexCoordIndex) Group childrenShape appearance Appearance materialMaterial ambientIntensity1diffuseColor specularColor1 11emissiveCo

48、lor0 00shininess transparency0) )geometryDEF _6 IndexedFaceSet coordUSE acoordIndex 43, 45, 107, -1, 45, 55, 107, -1,55, 56, 107, -1, 35, 32, 13, -1,13, 36, 34, -1, 34, 35, 13, -1,57, 44, 41, -1, 63, 64, 72, -1,64, 13, 71, -1, 44, 37, 41, -1,64, 71, 72, -1, 13, 107, 71, -1,-1 creaseAngle1normalIndex

49、texCoordIndex) Group childrenShape appearance Appearance materialMaterial ambientintensity0diffuseColor specularColor emissiveColor0 0 0shininess transparency0)geometry DEF _7 IndexedFaceSet coord USE acoordindex 78, 79, 80,-1, 81, 82, 83,-1, 85, 87, 89, -1, 85, 89, 91, -1, 79, 85, 91, -1, 79, 91, 80, -1, 90, 88, 86, -1, 90, 86, 84, -1, 81, 90, 84, -1, 81, 84, 82, -1, 92, 93, 94

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论