高级造型方法.docx
- 文档编号:28660901
- 上传时间:2023-07-19
- 格式:DOCX
- 页数:33
- 大小:20.29KB
高级造型方法.docx
《高级造型方法.docx》由会员分享,可在线阅读,更多相关《高级造型方法.docx(33页珍藏版)》请在冰豆网上搜索。
高级造型方法
18、高级造型方法
18.1挤压空间造型
Extrusion节点
Extrusion{
creaseAngle指定一个折痕角的阈值
endCapFALSE设置是否建立底盖
beginCapFALSE设置是否建立顶盖
solidFALSE设置造型是否是实体造型
crossSection[]指定一系列的二维坐标,定义封闭或开放的轮廓
spine[]定义一系列三维坐标,定义了一个封闭的或开放的轨迹
scale[]指定一系列放样图形、比例因素对
实例18.1
#通过挤压空间造型方法创建一个喇叭型的造型
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor1.01.00.0
specularColor1.00.700.0
shininess0.7
}
}
geometryExtrusion{
creaseAngle1.57
endCapFALSE
beginCapFALSE
solidFALSE
crossSection[1.000.00,
0.92-0.38,
0.71-0.71,
0.38-0.92,
0.00-1.00,
-0.38-0.92,
-0.71-0.71,
-0.92-0.38,
-1.00-0.00,
-0.920.38,
-0.710.71,
-0.380.92,
0.001.00,
0.380.92,
0.710.71,
0.920.38,
1.000.00
]
spine[0.00.00.0,0.00.40.0,
0.00.80.0,0.01.20.0,
0.01.60.0,0.02.00.0,
0.02.40.0,0.02.80.0,
0.03.20.0,0.03.60.0,
0.04.00.0]
scale[1.81.8,2.02.0,
2.02.0,1.951.95,
1.81.8,1.51.5,
1.21.2,1.01.0,
0.80.8,1.01.0,
1.151.15,
]
}
}
]
}
实例18.3
#创建一个空间螺旋状的空间造型
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor1.00.00.0
specularColor1.00.700.0
shininess0.7
}
}
geometryExtrusion{
creaseAngle1.57
endCapFALSE
beginCapFALSE
solidFALSE
crossSection[1.000.00,
0.92-0.38,
0.71-0.71,
0.38-0.92,
0.00-1.00,
-0.38-0.92,
-0.71-0.71,
-0.92-0.38,
-1.00-0.00,
-0.920.38,
-0.710.71,
-0.380.92,
0.001.00,
0.380.92,
0.710.71,
0.920.38,
1.000.00
]
spine[2.000.00-0.00,1.850.10-0.77,
1.410.20-1.41,0.770.30-1.85,
0.000.60-2.00,-0.770.80-1.85,
-1.411.00-1.41,-1.851.20-0.77,
-2.001.400.00,-1.851.600.77,
-1.411.801.41,-0.772.001.85,
0.002.202.00,0.772.401.85,
1.412.601.41,1.852.800.77,
2.003.000.00,1.853.20-0.77,
1.413.40-1.41,0.773.60-1.85,
0.003.80-2.00,-0.774.00-1.85,
-1.414.20-1.41,-1.854.40-0.77,
-2.004.600.00,-1.854.800.77,
-1.415.001.41,-0.775.201.85,
0.005.402.00,0.775.601.85,
1.415.801.41,1.856.000.77,
]
scale[0.20.2,0.250.25,
0.30.3,0.350.35,
0.40.4,0.450.45,
0.50.5,0.550.55,
0.60.6,0.650.65,
0.70.7,0.750.75,
0.80.8,0.850.85,
0.90.9,0.950.95,
1.01.0,1.051.05,
1.11.1,1.151.15,
1.21.2,1.251.25,
1.31.3,1.351.35,
1.41.4,1.451.45,
1.51.5,1.551.55,
1.61.6,1.651.65,
1.81.8,2.002.00,
]
}
}
]
}
18.2海拔栅格造型
通过以下两个实例加以说明
实例18.4
#山脉造型
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.01.00.0
specularColor0.00.800.0
shininess0.2
}
}
geometryElevationGrid{
xDimension10
zDimension10
xSpacing1.0
zSpacing1.0
solidFALSE
creaseAngle0.785
height[
0.0,0.0,0.5,0.0,0.7,0.6,0.0,0.0,0.0,0.0,
0.0,0.3,0.4,0.5,0.3,0.8,0.2,0.1,0.6,0.0,
0.2,0.6,0.7,0.3,0.7,1.6,1.0,0.6,0.7,0.0,
0.5,0.3,0.8,1.3,1.7,2.6,1.8,1.6,1.0,0.5,
1.5,2.3,1.8,2.3,2.7,3.6,4.8,3.6,1.5,1.5,
2.0,3.0,1.0,3.0,2.8,4.6,6.0,2.0,2.0,2.0,
0.5,0.3,0.8,1.3,1.7,2.6,1.8,1.6,1.0,0.5,
0.2,0.6,0.7,0.3,0.7,1.6,1.0,0.6,0.7,0.0,
0.0,0.0,0.5,0.0,0.7,0.6,0.0,0.0,0.0,0.0,
0.0,0.3,0.4,0.5,0.3,0.8,0.2,0.1,0.6,0.0,
]
}
}
]
}
实例18.5
#一个太阳的造型
#VRMLV2.0utf8
Group{
children[
Transform{
scale2.00.62.0
childrenShape{
appearanceAppearance{
materialMaterial{
diffuseColor1.00.80.0
shininess0.4
}
}
geometrySphere{
radius2.0
}
}
},
DEFWgroup01Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor0.00.01.0
shininess0.8
}
}
geometryDEFBgridElevationGrid{
xDimension2
zDimension10
xSpacing2.0
zSpacing1.0
solidFALSE
creaseAngle3.14
height[
-0.50,-0.50,
0.50,0.50
-0.50,-0.50
0.50,0.50,
-0.50,-0.50,
0.50,0.50,
-0.50,-0.50,
0.50,0.50,
-0.50,-0.50,
0.50,0.50
]
}
},
Transform{
rotation0.01.00.00.52
childrenShape{
appearanceAppearance{
materialMaterial{
diffuseColor1.00.00.0
shininess0.8
}
}
geometryUSEBgrid
}
},
Transform{
rotation0.01.00.01.05
childrenShape{
appearanceAppearance{
materialMaterial{
diffuseColor0.01.00.0
shininess0.8
}
}
geometryUSEBgrid
}
}
]
},
Transform{
rotation0.01.00.01.57
childrenUSEWgroup01
},
Transform{
rotation0.01.00.03.14
childrenUSEWgroup01
},
Transform{
rotation0.01.00.04.6
childrenUSEWgroup01
}
]
}
18.3点、线、面造型
Coordinate节点创建了一张坐标列表并且被作为基于坐标的几何节点的coord域值使用。
Coordinate{
Point[]
}
PointSet节点,可以在虚拟空间中创建出一系列的点,通常作为Shape节点的geometry域的域值。
PointSet{
coord
color
}
IndexedLineSet节点创建空间折线几何造型,同时可以被用作造型节点的geometry值域。
IndexedLineSet{
coord
coordIndex[]
color
colorIndex[]
colorPerVertEX
set_coordIndex[]
set_colorIndex
}
实例18.6
#创建空间5个点的空间点造型
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
emissiveColor1.01.00.0
}
}
geometryPointSet{
coordCoordinate{
point[
1.00.00.0,
0.00.01.0,
-1.00.00.0,
0.00.0-1.0,
0.01.60.0
]
}
}
}
]
}
实例18.7
#空间线框造型
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
emissiveColor1.01.00.0
}
}
geometryIndexedLineSet{
coordCoordinate{
point[
1.00.00.0,
0.00.01.0,
-1.00.00.0,
0.00.0-1.0,
0.01.60.0
]
}
coordIndex[
#连接各个顶点
0,4,2,1,0,3,4,1,3,2,0,-1
]
}
}
]
}
IndexedFaceSet节点创建空间面几何造型,同时可以被用作造型节点的geometry值
IndexedFaceSet{
Coord
coordIndex[]
convexFALSE
solidFALSE
}
实例18.8
#由5个面组成的空间方椎型造型
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
emissiveColor1.01.00.0
}
}
geometryIndexedFaceSet{
coordCoordinate{
point[
1.00.00.0,
0.00.01.0,
-1.00.00.0,
0.00.0-1.0,
0.01.60.0
]
}
coordIndex[
#创建各个面
0,1,2,3,4,-1,
0,4,1,-1,
1,4,2,-1,
2,4,3,-1,
3,4,0,-1,
]
}
}
]
}
实例18.9
#创建空间凹面造型
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{
diffuseColor1.00.80.0
}
}
geometryIndexedFaceSet{
coordCoordinate{
point[
0.00.00.0,
5.55.00.90,
4.05.51.00,
7.08.01.40,
4.09.01.60,
1.05.00.90,
2.54.50.80,
5.55.0-0.90,
4.05.0-1.00,
7.08.0-1.40,
4.09.0-1.60,
1.05.0-0.90,
2.54.5-0.80,
]
}
coordIndex[
0,1,2,3,4,5,6,-1,
0,12,11,10,9,8,7,-1,
0,7,1,-1,
1,7,8,2,-1,
2,8,9,3,-1,
3,9,10,4,-1,
4,10,11,5,-1,
5,11,12,6,-1,
6,12,0,-1
]
convexFALSE
}
}
]
}
实例18.10
#创建复杂的面空间场景
#VRMLV2.0utf8
Group{
children[
Shape{
appearanceAppearance{
materialMaterial{}
}
geometryBox{
size30.00.130.0
}
},
DEFWceilingTransform{
translation0.02.00.0
children[
DEFceilingShape{
appearanceAppearance{
materialMaterial{
diffuseColor1.01.00.0
}
}
geometryIndexedFaceSet{
coordCoordinate{
point[
-1.00.01.0,
-1.00.260.97,
-1.00.50.87,
-1.00.710.71,
-1.00.870.5,
-1.00.970.26,
-1.01.00.0,
-1.00.97-0.26,
-1.00.87-0.5,
-1.00.71-0.71,
-1.00.5-0.87,
-1.00.26-0.97,
-1.00.0-1.0,
-1.00.01.0,
-0.970.260.97,
-0.870.50.87,
-0.710.710.71,
-0.50.870.5,
-0.260.960.26,
0.01.00.0,
-0.260.96-0.26,
-0.50.87-0.5,
-0.710.71-0.71,
-0.870.5-0.87,
-0.970.26-0.97,
-1.00.0-1.0,
]
}
coordIndex[
0,13,14,1,-1,
1,14,15,2,-1,
2,15,16,3,-1,
3,16,17,4,-1,
4,17,18,5,-1,
5,18,19,5,-1,
6,19,20,7,-1,
7,20,21,8,-1,
8,21,22,9,-1,
9,22,23,10,-1,
10,23,24,11,-1,
11,24,25,12,-1,
]
solidFALSE
}
}
Transform{
translation-2.00.00.0
rotation0.01.00.03.14
children[
USEceiling
]
}
]
},
Transform{
translation-2.00.00.0
childrenUSEWceiling
},
Transform{
translation2.00.00.0
childrenUSEWceiling
},
Transform{
translation0.00.0-2.0
childrenUSEWceiling
},
Transform{
translation0.00.02.0
childrenUSEWceiling
},
Transform{
translation-3.01
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 高级 造型 方法