虚拟现实实验报告

  • 格式:docx
  • 大小:1.75 MB
  • 文档页数:32

下载文档原格式

  / 32
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18: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 {

diffuseColor 0.8 0.9 0.1

}

}

Geometry Cylinder {

radius 0.3

height 2.0

bottom FALSE

}

}

截图:

实验二三维立体造型的设计与实现(需交实验报告)

一、实验内容

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 0

rotation 0 0 1 0.5

children [

DEF leg Shape {

appearance Appearance {

material Material {

diffuseColor 0.3 0.3 0.3

ambientIntensity 0.3

specularColor 0.7 0.7 0.7

shininess 0.1

}

}

geometry Box {

size 2 0.2 4

}

}

]

}

Transform{

translation 2 0 0

rotation 0 0 1 -0.5

children [

USE leg

]

}

Transform {

translation 0 0.52 0

scale 1.5 1 1

children [

Shape {

appearance Appearance {

material Material {

diffuseColor 0.5 0.3 0.2

transparency 0.15

}

}

geometry Cylinder {

radius 3

height 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.8

justify "MIDDLE"

}

}

}

Transform {

translation -3 -0.5 0

scale 1.2 1.2 1.2

children [

Inline {

url "1-1.wrl"

}

]

}

Transform {

translation 3 -0.5 0

scale 1.2 1.2 1.2

children [

Inline {

url "1-1.wrl"

}

]

}

截图:

3)4-4

代码:

Shape {

appearance Appearance {

material Material {

diffuseColor 1 0 0

}

}