当前位置:文档之家› 虚拟现实实验报告(DOC 30页)

虚拟现实实验报告(DOC 30页)

虚拟现实实验报告(DOC 30页)实验一造型定位和旋转、缩放一、实验内容:1.熟悉VrmlPad编辑器的安装和使用2.熟悉Cortonaplayer浏览器的安装和使用3.掌握虚拟造型的基本操作。

二、实验环境:1.硬件环境计算机一台2.软件环境WindowsXP操作系统、VrmlPad编辑器和Cortonaplayer浏览器三、实验步骤:完成第四章例4-1代码:Shape {appearance Appearance {material Material {diffuseColor 0.9 0.1 0.05}}geometry Sphere {radius 0.85}}Shape {appearance Appearance {material Material {实验二三维立体造型的设计与实现(需交实验报告)一、实验内容1.熟悉各种立体造型的设计2.学会利用各种不同的立体造型组合实现复杂的造型二、实验环境1.硬件环境计算机一台2.软件环境WindowsXP操作系统、VrmlPad编辑器和Cortonaplayer浏览器三、实验步骤:1.制作一个烟囱的立体造型,首先以原点为中心生成一个半径为1、高度为2的圆柱体,然后以(0,0,1.5)为坐标变换节点的新原点生成一个底面半径为2,高度为1的圆锥体。

2.建立一个带刻度的钟表造型:首先生成钟表面box造型,然后在钟表面上利用球体sphere造型生成各个刻度,利用圆柱体cylinder造型生成时针、分针等造型。

其中利用Transform坐标变换节点对各个造型进行平移、缩放以及旋转操作。

3.设计一个文本造型。

4、完成书中第四章的例4-2 、4-3和4-4。

1)4-2代码:Transform {translation -2 0 0rotation 0 0 1 0.5children [DEF leg Shape {appearance Appearance {material Material {diffuseColor 0.3 0.3 0.3ambientIntensity 0.3specularColor 0.7 0.7 0.7shininess 0.1}}geometry Box {size 2 0.2 4}}]}Transform{translation 2 0 0rotation 0 0 1 -0.5children [USE leg]}Transform {translation 0 0.52 0scale 1.5 1 1children [Shape {appearance Appearance { material Material {diffuseColor 0.5 0.3 0.2transparency 0.15}}geometry Cylinder {radius 3height 0.1}}]}截图:2)4-3代码:Shape {appearance Appearance { material Material {diffuseColor 1.0 0 0 }}geometry Text {string ["Happy" "new" "Year!"]fontStyle FontStyle {style "BOLDITALIC"size 0.8justify "MIDDLE"}}}Transform {translation -3 -0.5 0 scale 1.2 1.2 1.2children [Inline {url "1-1.wrl"}]}Transform {translation 3 -0.5 0scale 1.2 1.2 1.2children [Inline {url "1-1.wrl"}]}截图:3)4-4代码:Shape {appearance Appearance {material Material {diffuseColor 1 0 0}}geometry IndexedFaceSet {coord Coordinate {point [0.00 -0.05 -1, 0.35 -0.10 -1,0.53 -0.26 -1, 0.63 -0.50 -1,0.79 -0.71 -1, 1.00 -0.87 -1,1.24 -0.97 -1, 1.50 -1.00 -1,1.76 -0.97 -1,2.00 -0.90 -1,0.00 -0.05 -1, 0.35 -0.10 1,0.53 -0.26 -1, 0.63 -0.50 1,0.79 -0.71 -1, 1.00 -0.87 1,1.24 -0.97 -1, 1.50 -1.00 1,1.76 -0.97 -1,2.00 -0.90 1,]}coordIndex [0 10 11 1 -1,1 11 12 2 -1,2 12 13 3 -1,3 13 14 4 -1,4 14 15 5 -1,5 15 16 6 -1,6 16 17 7 -1,7 17 18 8 -1,8 18 19 9 -1]solid FALSEcreaseAngle 0.875}}Shape {appearance Appearance {material Material {diffuseColor 0.3 0.3 0.3ambientIntensity 0.3specularColor 0.7 0.7 0.8shininess 0.1}}geometry Extrusion {crossSection [ ]spine [1.8 -1.0 0.75,1.8 -1.5 0.75,0.6 -1.5 0.75,0.6 -1.5 -0.75,0.6 -1.5 -0.75,1.8 -1.5 -0.75,1.8 -1.0 -0.75]scale [0.03 0.05]}}截图:实验三造型的空间变换以及编程技术应用一、实验内容1. 熟悉Transform空间变换节点的运用2. 熟悉Group编组造型节点的运用3. 熟悉DEF、USE、Inline、Anchor、PROTO等节点的运用二、实验环境1. 硬件环境计算机一台2. 软件环境VrmlPad编辑器和CortonaPlayer浏览器三、实验步骤1. 利用Transform空间变换节点和Group编组节点来设计生成4个米字造型,多个造型之间从前到后依次排列。

首先,利用Group编组节点和DEF、USE素材调用方式生成一个米字型的造型;然后利用Transform空间变换节点中translation 域的域值设定来改变不同的米字造型的前后位置关系,需要用到Group编组造型节点的嵌套。

2. 利用PROTO原型节点,设计生成四个带刻度的钟表面,四个带刻度钟表面的位置、大小以及颜色均有不同。

首先,利用PROTO原型节点定义钟表面,同时将其定义的参数铜鼓IS关键字传给Transform空间变换节点的translation域、Material节点里面的diffusecolor域、box节点里面的size域来改变造型的空间位置、颜色和大小。

3、完成书中第四章的例4-5、4-6 与4-7。

1)4-5代码:Group {children [Shape {appearance Appearance {material Material { }texture ImageTexture {url "wood.jpg"}}geometry Box {size 2 2.4 0.8}}Transform {translation 0 0 0.4children [Shape {appearance Appearance {material Material {}texture ImageTexture {url "bookcase.jpg"}}geometry Box {size 2 2.4 0.01}}]}]}截图:2)4-6代码:Shape {appearance Appearance { material Material {} texture MovieTexture {url "steady.mpg"loop TRUE}}geometry Box {size 2.4 2 0.01 }}Sound {source AudioClip { url "steady.mpg"loop TRUE}intensity 1maxFront 16maxBack 16minFront 8minBack 8}3)4-7代码:NavigationInfo {headlight FALSE}PointLight {location 0 5 0intensity 0.8ambientIntensity 0.5on TRUE}Shape {appearance Appearance {material Material {diffuseColor 1 0 0 }}geometry Sphere {radius 0.9}}Transform {translation 0 -3 0children [Shape {appearance Appearance { material Material {}}geometry Box {size 8 0.02 6}}]}Transform {translation 0 -2.99 0 children [Shape {appearance Appearance {material Material {diffuseColor 0 0 0transparency 0.5}}geometry Cylinder {height 0.05side FALSEbottom FALSE}}]}截图:实验四简单的虚拟现实环境场景设计(需交实验报告)一.实验内容1. 理解VRML中虚拟现实场景中具有的一些要素2. 利用Background背景节点设置场景的背景3. 综合利用Transform空间变换节点、Shape空间造型节点、MovieTexture电影纹理节点以及Sound声音节点设计一个播放电影的平板电视造型效果二、实验环境1. 硬件环境计算机一台2. 软件环境三、实验步骤:1. 创建一个简单的天空地面组合而成的背景。

通过设置Background背景节点里面的skyColor和skyAngle来设置天空的背景颜色渐变的效果,有蓝色逐渐转变成远处地平线位置的白色;同时设置BackGround背景节点里面的goundColor和groundAngle来设置地面背景颜色渐变的效果,由深褐色慢慢变到远处地平线位置的浅褐色。

相关主题