VRML虛擬現(xiàn)實開發(fā)文檔_第1頁
VRML虛擬現(xiàn)實開發(fā)文檔_第2頁
VRML虛擬現(xiàn)實開發(fā)文檔_第3頁
VRML虛擬現(xiàn)實開發(fā)文檔_第4頁
VRML虛擬現(xiàn)實開發(fā)文檔_第5頁
已閱讀5頁,還剩39頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、虛擬現(xiàn)實開發(fā)文檔羅維030913501 .功能概述運用vrml語言構(gòu)造了一個虛擬現(xiàn)實世界。運動物體包括氣球,火車,汽車,交通燈等, 靜止物體包括山脈,樹林,房屋,人物,花草,電話亭,國旗,座椅,廣告牌,雨傘等,另 外還包含背景和聲音。2 .使用說明廣告牌截圖:#VRML utf8程序:背景顏色Transform translation children Transform translation 0 children #創(chuàng)建廣告牌造型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#廣告屏幕#廣告柱子模型節(jié)點#空間物體造型外觀#一種材料的漫反射顏色柱體節(jié)點圓柱體半徑圓柱體高圓柱體有頂#圓柱體有底圓柱體有曲面椅子腿熱氣球截圖:程序:#VRML utf8Group children BackgroundskyColor)#創(chuàng)建月球造型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 #空間物體造型外觀一種材料的漫反射顏色#多少環(huán)境光被該表面反射物體鏡面反射光線的顏色 造型外觀材料的亮度球體ImageTexture

5、""空間物體造型外觀diffuseColor # ambientintensity # specularColor # shininess # ) ) geometry Cylinder #radius height side TRUE top TRUE bottom TRUE ) ) )一種材料的漫反射顏色多少環(huán)境光被該表面反射 物體鏡面反射光線的顏色造型外觀材料的亮度潛艇艦橋(噫望塔)熱氣球運動程序:#VRML utf8引入月球造型#時間傳感器#移動位置節(jié)點相對時間的邏輯值空間坐標(biāo)的位置值與相對時間的邏輯值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側(cè)面#車窗戶T

19、ransform translation -7 rotation 0 0 1 children Shape appearance Appearance texture ImageTexture url "" material Material geometry Box size 13側(cè)面#車窗戶椅子 截圖:程底:#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模型節(jié)點#空間物體造型外觀#一種材料的漫反射顏色柱體節(jié)點圓柱體半徑圓柱體高圓柱體有頂圓柱體有底圓柱體有曲面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 #創(chuàng)建山脈造型模型節(jié)點Shape # Shapeappearance Appearance""texture ImageTexture urlmaterial Material #diffuseColor #空間物體造型外觀 一種材料的漫反射顏色geometry ElevationGrid #海拔珊格節(jié)點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,#綠燈#時間傳感器#顏色插補(bǔ)器紅燈#相對時間間隔值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,#顏色插補(bǔ)器綠燈#顏色變換值1keyValue 0 0,0 0,0 1 0,0 1 0,0 0, 0 0#顏色變換值DEF YellowCI Colorinterpolator key 0,#顏色插補(bǔ)器黃燈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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論