虚拟现实报告.docx
《虚拟现实报告.docx》由会员分享,可在线阅读,更多相关《虚拟现实报告.docx(26页珍藏版)》请在冰豆网上搜索。
虚拟现实报告
虚拟现实技术大作业设计说明书
设计题目:
放映室
姓名:
学号:
单位:
计算机科学与技术030911班
一:
设计目标说明(描述目标)
放映室内有电视可以看视频,听歌,有座位可以聊天休息。
风扇可以转动,可移动的玻璃门。
二:
设计环境说明(描述本设计所使用的软硬环境)
vrmlPad
三:
设计过程说明(较详细描述自己的设计思路,设计过程,能够体现出本设计是自己做的。
,源代码详细注释.
原本想在一个封闭的空间建立自己的作品,真正做的时候发现封闭空间内坐标不容易找到,于是自己做了一个封闭的空间。
由于时间仓促,有些东西做得并不精细。
有些贴图网上找不到,就自己用photoshop做。
其中有一部分借鉴了老师和网上提供的例子。
首先建立了背景。
背景上建立两个立方体,木板状的,作为房顶和地板。
然后建立四根柱子,再将除正面外其余三面墙围起来。
正面的墙留着后面做玻璃门。
然后在背面的墙建立一个立方体,作为电视机的底座,仿照老师给的例子建立电视机。
桌子是由5个圆柱构成的,一个大的作为桌子面,剩下的作为四个腿。
然后将房间在另一边复制一张桌子。
凳子是有一个圆柱和一个圆构成的,在房间内复制了十个。
然后制作玻璃门,运用时间传感器和位置传感器建立一个可推拉的门,然后在门两边建立玻璃墙。
最后建立风扇,风扇需要点一下才能转动。
风扇也借鉴了老师的例子。
最后给放映厅加了音乐,使其功能更齐全。
放映厅有四个视点,分别是左面,右面,正面,和外观。
通过这次上机是我了解了vrml的功能,经历了两天时间,仔细计算各个物体的空间坐标,学习各个函数功能,终于完成了虚拟现实的大作业。
这将对我以后的学习工作上有一定的帮助的。
代码如下:
#VRMLV2.0utf8
Background{
groundColor[
0.70.60.8
]
groundAngle1.57
skyColor[
0.20.50.6
]
}
DEFveiw1Viewpoint{
position-20,10,12
description"view1"
}
DEFview2Viewpoint{
position0,6,0
description"veiw2"
}
DEFview3Viewpoint{
position20,10,12
description"view3"
}
DEFview4Viewpoint{
position0,10,45
description"view4"
}
Transform{
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"Tiles036a.jpg"
}
}
geometryBox{
size50,2,25
}
}
]
}
Transform{
translation0,6,-12.5
children[
Shape{
appearanceAppearance{
materialMaterial{
ambientIntensity0.7
diffuseColor0.10.70.9
emissiveColor0.40.70.8
shininess0.4
}
}
geometryBox{
size14,10,4
}
}
]
}
Transform{
translation0,6,-10
children[
Background{
skyColor0.20.80.5
}
Transform{
translation0.00.0-0.12
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.20.30.3
}
}
geometryBox{
size8.46.50.2
}
}
]
}
DEFmovieMovieTexture#电影纹理节点
{
url"hw.mpg"#电影文件*.mpg
loopTRUE
repeatSFALSE
repeatTFALSE
speed1.5
}
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.00.00.0
}
textureUSEmovie
}
geometryBox{
size7.65.60.01#电影屏幕
}
}
]
}
DEFzhuzziTransform{
translation25,5,12.5
children[
Shape{
appearanceAppearance{
materialMaterial{
}
}
geometryCylinder
{
height15
radius2
bottomFALSE
sideTRUE
topTRUE
}
}
]
}
Transform{
translation0,0,-25
childrenUSEzhuzzi
}
Transform{
translation-50,0,0
childrenUSEzhuzzi
}
Transform{
translation-50,0,-25
childrenUSEzhuzzi
}
Transform{
translation0,12,0
children[
Shape{
appearanceAppearance{
materialMaterial{
ambientIntensity0.4
diffuseColor0.30.70.5
emissiveColor0.40.70.8
shininess0.4
specularColor10.30.5
transparency0
}
}
geometryBox{
size50,2,25
}
}
]
}
DEFqiangbiTransform{
translation25,5,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryBox{
size1,15,25
}
}
]
}
Transform{
translation-50,0,0
childrenUSEqiangbi
}
Transform{
translation0,5,-12.5
children[Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryBox{
size50,15,1
}
}
]
}
DEFzhuoziGroup{
children[
Transform{
translation12.5,2,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"20100718122829mbmtu.jpg"
}
}
geometryCylinder{
bottomTRUE
height0.3
radius2
sideTRUE
topTRUE
}
}
]
}
Transform{
#translation1.4,-1,0
translation13.9,1,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
Transform{
#translation-1.4,-1,0
translation11.1,1,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
Transform{
#translation0,-1,1.4
translation12.5,1,1.4
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
Transform{
#translation0,-1,-1.4
translation12.5,1,-1.4
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
]
}
Group{
children[
Transform{
translation-12.5,2,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"20100718122829mbmtu.jpg"
}
}
geometryCylinder{
bottomTRUE
height0.3
radius2
sideTRUE
topTRUE
}
}
]
}
Transform{
#translation1.4,-1,0
translation-13.9,1,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
Transform{
#translation-1.4,-1,0
translation-11.1,1,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
Transform{
#translation0,-1,1.4
translation-12.5,1,-1.4
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
Transform{
#translation0,-1,-1.4
translation-12.5,1,1.4
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"www.jpg"
}
}
geometryCylinder{
bottomTRUE
radius0.1
height2
sideTRUE
topFALSE
}
}
]
}
]
}
Transform{
translation3,4,-12.5
children[
DEFsoundTransform{
translation0.00.0-0.12
scale1.51.50.8
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.30.30.3
transparency0.9
}
textureImageTexture{
url"0108.jpg"
}
}
geometrySphere{
radius2.0
}
}
]
}
Transform{
translation-3,4,-12.5
scale0.31.00.5
children[USEsound]
}
]
}
DEFBox10Transform{
translation2512.5
rotation-100-1.571
children[
DEFBox10-TIMERTimeSensor{loopFALSEcycleInterval0.6667},
DEFBox10-POS-INTERPPositionInterpolator{
key[0,0.15,0.3,0.45,0.6,0.75,0.9,1,1.15,1.3,1.45,1.6,1.75,1.9,2]
keyValue[-35,12.5,-2512.5,-0512.5,
0512.5,1.616512.5,2.726512.5,
3.835512.5,4.944512.5,6.053512.5,
7.162512.5,8.235512.5,9.567512.5,
10.234512.5,11.3455,12.5,12.567512.5,
]},
Transform{
translation00.023240
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.11370.4980.7216
ambientIntensity0.5686
specularColor0.67350.67350.6735
shininess0.2875
transparency0.31
}
}
geometryBox{size12.5,0.5,15}
}
]}
DEFTouchSensor01-SENSORTouchSensor{enabledTRUE}
]
ROUTEBox10-TIMER.fraction_changedTOBox10-POS-INTERP.set_fraction
ROUTEBox10-POS-INTERP.value_changedTOBox10.set_translation
}
ROUTETouchSensor01-SENSOR.touchTimeTOBox10-TIMER.startTime
Transform{
translation13512.5,
rotation-100-1.571
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.11370.4980.7216
ambientIntensity0.5686
specularColor0.67350.67350.6735
shininess0.2875
transparency0.31
}
}
geometryBox{size17,0.5,15}
}
]
}
Transform{
translation-15512.5,
rotation-100-1.571
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.11370.4980.7216
ambientIntensity0.5686
specularColor0.67350.67350.6735
shininess0.2875
transparency0.31
}
}
geometryBox{size13,0.5,15}
}
]
}
DEFyiziTransform{
translation18,1,0
children[
Transform{
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"6451-110z510294847.jpg"
}
}
geometryCylinder{
bottomTRUE
sideTRUE
height1
radius0.5
topFALSE
}
}
Transform{
translation0,0.5,0
children[
Shape{
appearanceAppearance{
textureImageTexture{
url"6451-110z510294847.jpg"
}
}
geometrySphere{
radius0.5
}
}
]
}
]
}
]
}
Transform{,
translation-80,-10
childrenUSEyizi
}
Transform{
translation-