基于vrml的虚拟建模培训课件

上传人:F****n 文档编号:96411152 上传时间:2019-08-26 格式:PPT 页数:70 大小:1.85MB
返回 下载 相关 举报
基于vrml的虚拟建模培训课件 _第1页
第1页 / 共70页
基于vrml的虚拟建模培训课件 _第2页
第2页 / 共70页
基于vrml的虚拟建模培训课件 _第3页
第3页 / 共70页
基于vrml的虚拟建模培训课件 _第4页
第4页 / 共70页
基于vrml的虚拟建模培训课件 _第5页
第5页 / 共70页
点击查看更多>>
资源描述

《基于vrml的虚拟建模培训课件 》由会员分享,可在线阅读,更多相关《基于vrml的虚拟建模培训课件 (70页珍藏版)》请在金锄头文库上搜索。

1、三 基于VRML的虚拟建模,VRML场景创建 VRML颜色、纹理与灯光模型 VRML声音与LOD加速 VRML动画与交互 地形的LOD模型实现,实习工具,VRML编辑器 VRMLPad VRML浏览 Parallel Graphics公司的Cortona 3DSMAX,Cortona浏览器界面:,VRML场景创建 VRML中几何形体的基本构成模块是造型,造型由节点和其域及域值描述构成 VRML中几何造型节点5类 原始几何造型节点(Box,Cone,Cylinder,Sphere) 点、线、面集节点(PointSet,IndexedLineSet,IndexedFaceSet,Coordinat

2、e) 海拔节点(ElevationGrid) 挤出节点(Extrusion) 文本造型节点(Text),VRML文件结构,文本叙述(Textual Description)文件,可用任何文本编辑器编写VRML文件,保存成 .wrl文件。,#VRML V2.0 utf8 #Draw the column Shape appearance DEF Yellow Appearance material Material diffuseColor 1.0 1.0 0.0 geometry Cylinder radius 0.5 height 4.0 #Draw the base Transform t

3、ranslation 0 -3 0 children Shape appearance USE Yellow geometry Box size 2.0 2.0 2.0 ,节点,VRML文件最基本的单位,节点还包含子节点(Child Node)和描述节点属性的字段(Fields)。,Shape节点:用来形容对象的几何形状(Geometry节点,如球体、长方体和圆柱体)及外观 (Appearance节点,如表面的颜色、透明度和光滑度)的节点。,前例中的一个节点,geometry Cylinder radius 0.5 height 4.0 ,一个节点通常包含节点的名称(如Cylinder),一对

4、大括号 ,以及字段和字段值(如radius 0.5)。,字段和字段值描述节点的属性。,Shape造型节点重要的基本节点之一 定义一个VRML造型具有的几何尺寸和外观 所有的VRML造型都使用shape节点创建,Shape节点:构建虚拟对象的轮廓,即模型。包含两个字段,Appearance(外观)节点和Geometry(几何)节点字段。,Shape节点语法:,Shape exposedField SFNode appearance NULL exposedField SFNode geometry NULL ,字段说明,节点值(SFNode):表明一个属性节点,控制造型节点创建造型。,几何造型节

5、点Geometry,Geometry域的域值用于设定一个几何造型节点 简单几何造型节点 长方体BOX 球体Sphere 圆锥体Cone 圆柱体Cylinder 复杂几何造型节点 点集 线集 面集,几何箱型节点Box,Box节点:构建一个箱型几何对象,是Shape节点的Geometry节点之一字段是size,控制箱型的尺寸,长、高和宽分别位于X轴、Y轴和Z轴。如果没有设置箱型对象的位置,它的几何中心默认位置在原点(0,0,0),长、高、宽的默认值为(2,2,2)。,Box节点语法:,Box field SFVec3f size 2 2 2 # (0, ) ,字段说明,三维浮点矢量(SFVec3f

6、和MFVec3f):值为3个浮点值,用于指定三维位置。,#VRML V2.0 utf8 Shape appearance Appearance material Material geometry Box size 3 2 3 ,几何圆锥体节点Cone,Cone(圆锥体)节点:圆锥体。Shape节点的Geometry节点之一。尺寸由bottomRadius(底部半径)和height(高)两个字段控制;还有两个布尔值的字段分别为side和bottom,控制圆锥体四周和底部是否要创建。它的默认位置,顶点在(0,height/2,0),底部圆心在(0,-height/2,0)。,布尔值(SFBool

7、):开关值。值为TRUE或FALSE,常用于指定某一属性的开关或关闭。,Cone Node Syntax,Cone field SFFloat bottomRadius 1 # (0, ) field SFFloat height 2 # (0, ) field SFBool side TRUE field SFBool side TRUE ,字段说明,浮点值(SFFloat):浮点值。值为具有正负之分的实数,用于指定某一确定的数值属性。,#VRML V2.0 utf8 Shape appearance Appearance material Material geometry Cone bo

8、ttomRadius 2 height 4 side TRUE bottom FALSE ,几何圆柱体节点Cylinder,Cylinder(圆柱体)节点:构建一个圆柱体。 是Shape节点的Geometry节点之一。控制外型大小的字段分别是height(高)和radius(半径);还有三个布尔值的字段分别是bottom、side和top,确定底部、四周和顶部是否创建。若没有给定任何的起始位置,它的几何中心位置在原点(0,0,0)。,Cylider Node Syntax,Cylinder field SFBool bottom TRUE field SFFloat height 2 # (0

9、, ) field SFFloat radius 1 # (0, ) field SFBool side TRUE field SFBool top TRUE ,字段说明,#VRML V2.0 utf8 Shape appearance Appearance material Material geometry Cylinder radius 1.5 height 3 side TRUE bottom TRUE top FALSE ,几何球体节点Sphere,Sphere节点是一个最基本的Geometry节点。用于构建球体,只有一个字段,控制半径的radius字段,其默认几何中心位置在原点(0

10、,0,0)。,Sphere Node Syntax,Sphere field SFFloat radius 1 # (0, ) ,字段说明,#VRML V2.0 utf8 Shape appearance Appearance material Material geometry Sphere radius 1.6 ,点集合节点PointSet,一个VRML的点是利用坐标x、y、z定义出位置。PointSet节点是将很多点集合起来。PointSet包含两个字段,这两个字段都是节点:一个是color字段,用Color节点来控制颜色;另一个是coord字段,用Coordinate节点来控制坐标。,

11、字段说明,PointSet Node Syntax,PointSet exposedField SFNode color NULL exposedField SFNode coord NULL ,字段说明,Coordinate Node Syntax,Coorinate ExposedFieldMFVec3f point # (-, ) ,#VRML V2.0 utf8 Shape geometry PointSet color Color color 1.0 0.0 0.0, #RED 0.0 1.0 0.0, #GREEN 0.0 0.0 1.0, #BLUE 0.0 0.0 0.0, #

12、BLACK 1.0 1.0 1.0, #WHITE 1.0 1.0 0.0, #YELLOW 0.0 1.0 1.0, #GREENBLUE 1.0 0.0 1.0 #PURPLE coord Coordinate point 1.0 1.0 1.0, 1.0 -1.0 1.0, -1.0 -1.0 1.0, -1.0 1.0 1.0, 1.0 1.0 -1.0, 1.0 -1.0 -1.0, -1.0 -1.0 -1.0, -1.0 1.0 -1.0 ,指针线集合节点IndexedLineSet,VRML的线是由两点连接所构成的一条直线。IndexedLineSet节点就是将许多线集合在一起,并给定每条线一个指针(Index)。,字段说明,事件说明,#VRML V2.0 utf8 Shape appearance Appearance

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > PPT模板库 > PPT素材/模板

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号