资源预览内容
第1页 / 共7页
第2页 / 共7页
第3页 / 共7页
第4页 / 共7页
第5页 / 共7页
第6页 / 共7页
第7页 / 共7页
亲,该文档总共7页全部预览完了,如果喜欢就下载吧!
资源描述
第 1 页 共 7 页华北水利水电学院 虚拟现实技术 实验报告20142015 学年 第 一 学期 13 级 计算机科学与技术 专业班级: 学号: 姓名: 实验三 虚拟现实复杂场景建模与漫游仿真一、 实验目的:掌握虚拟现实技术复杂三维场景建模技术。在场景中引入环境背景、动画与交互等,构建逼真的三维场景。二、试验要求:本次试验为综合性质试验,要求自行设计一个较为复杂的场景或者单体模型,其中包含各种造型与渲染技术,比如纹理材质、光照、环境背景、声音视频、动画与交互等。场景内容不限。三、试验步骤:主要代码如下: NavigationInfo type EXAMINE, ANY headlight TRUE DEF vp1 Viewpoint #set the viewpoint position 2 0 11 Transform translation 3 -2.5 -2 rotation 0 0 1 1.57 children Transform rotation 0 -1 0 0.33 children Shape appearance Appearance material Material texture ImageTexture url wood.jpg geometry Box size 0.1 30 17 Transform #weight scale translation -2 0 0 children Transform rotation 1 0 -1 1.571 children Shape appearance Appearance 第 2 页 共 7 页material Material diffuseColor 0.9 0.1 0.4 specularColor .18 .25 .23 ambientIntensity .0433 shininess .06 #end Appearance geometry Cylinder radius 0.9 height 0.3 #end dial base DEF weight TouchSensor Transform #dial face (white) translation 0 0.21 0 children Shape appearance Appearance material Material diffuseColor 1 1 1 geometry Cylinder radius 0.8 height 0.05 Transform # scale children DEF scale Transform translation 0 0.22 -0.6 rotation 1 0 0 1.571 children Shape appearance Appearance material Material diffuseColor 0.9 0.1 0.4 texture ImageTexture geometry Cone bottomRadius 0.1 height 0.1 Transform rotation 0 1 0 0.5236 children USE scale Transform rotation 0 1 0 1.0472 children USE scale 第 3 页 共 7 页Transform rotation 0 1 0 1.5708 children USE scale Transform rotation 0 1 0 2.0944 children USE scale Transform rotation 0 1 0 2.6180 children USE scale Transform rotation 0 1 0 3.1416 children USE scale Transform rotation 0 1 0 3.6652 children USE scale Transform rotation 0 1 0 4.1888 children USE scale Transform rotation 0 1 0 4.7124 children USE scale Transform rotation 0 1 0 5.2360 children USE scale Transform rotation 0 1 0 5.7596 children USE scale Transform #weight scale needle children DEF index Transform translation -0.1 0.5 0.1 rotation 0 1 0 0.9 scale 0.85 1 0.85 children Shape 第 4 页 共 7 页appearance Appearance material Material diffuseColor 1 0.1 0.1 geometry IndexedFaceSet coord Coordinate point 0.07 0 0, #0.03 0 -1, -0.03 0 -0.7, -0.07 0 0, coordIndex 0,1,2,-1 Transform translation 0 -1.6 0 children Shape appearance Appearance material Material diffuseColor 0.9 0.1 0.4 geometry Cylinder radius 0.08 height 3 Transform #weight scale base translation 0.8 -3 0.2 rotation 1 -1 0 0.571 children Shape appearance Appearance material Material diffuseColor 0.9 0.1 0.4 geometry Box size 2 0.2 1 DEF doll T 第 5 页 共 7 页DEF Timer4 TimeSensor #eyesight tabel-needle TimeSensor enabled FALSE startTime 0.0 ransform translation 3 -2.7 0.76 #rotation 1 0 0 1.5 #scale 1 1 1 children DEF movedoll PlaneSensor minPosition -5 -2.5 #set PlaneSensormovedoll with maxPosition maxPosition 8 -0.5 Shape appearance Appearance texture ImageTexture url pangpang.gif material Material diffuseColor 1 .85 0 specularColor .87 .25 .25 ambientIntensity .157 shininess 1 #transparency .737 geometry Sphere radius 0.6 Transform translation 8 -1 0 rotation 1 1 0 0.5 children Shape appearance Appearance material Material diffuseColor 1 1 1 texture ImageTexture url shili.jpg geometry Box size 0.1 4 1 DEF image TouchSensor DEF Timer TimeSensor enabled FALSE startTime 0.0 cycleInterval 10.0 第 6 页 共 7 页loop TRUE DEF Timer2 TimeSensor enabled FALSE startTime 0.0 cycleInterval 10.0 loop TRUE DEF Timer3 TimeSensor enabled FALSE startTime 0.0 cycleInterval 10.0 loop TRUE cycleInterval 10.0 loop TRUE DEF PI PositionInterpolator key 0 keyValue-1 -2.3 0.76 DEF OI OrientationInterpolator key 0 keyValue1 1 0 0.5 DEF OI2 OrientationInterpolator key 0 keyValue0 1 0 0.9 DEF PI2 PositionInterpolator key 0 keyValue6.2 -0.7 0 ROUTE weight.isActive TO Timer.set_enabled ROUTE Timer.fraction_changed TO PI.set_fraction ROUTE PI.value_changed TO doll.set_translation ROUTE weight.isActive TO Timer2.set_enabled ROUTE Timer2.fraction_changed TO OI.set_fraction ROUTE OI.value_changed TO index.set_rotation ROUTE image.isActive TO Timer3.set_enabled ROUTE Timer3.fraction_changed TO PI2.set_fraction ROUTE PI2.value_changed TO doll.set_translation ROUTE image.isActive TO Timer4.set_enabled 第 7 页 共 7 页ROUTE Timer4.fraction_changed TO OI2.set_fraction ROUTE OI2.value_changed TO index.set_rotation ROUTE movedoll.transl
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号