构造实体几何
模板参数错误!(代码36)
|
构造实体几何(英文为 Constructive solid geometry,缩写为 CSG)是实体造型中应用的一项技术。CSG 是 三维计算机图形学与CAD中经常使用的一个过程建模技术。在构造实体几何中,建模人员可以使用逻辑运算符将不同物体组合成复杂的曲面或者物体。通常 CSG 都是表示看起来非常复杂的模型或者曲面,但是它们通常都是由非常简单的物体组合形成的。在有些场合中,构造实体几何只在多边形网格上进行处理,因此可能并不是过程性的或者参数化的。
最简单的实体表示叫作 primitives,通常是形状简单的物体,如立方体、圆柱体、棱柱、棱锥、球体、圆锥等。根据每个软件包的不同这些 primitives 也有所不同,在一些软件包中可以使用弯曲的物体进行 CSG 处理,在另外一些软件包中则不支持这些功能。
构造物体就是将 primitives 根据集合论的布尔运算组合在一起,这些运算包括:并集、交集以及补集。
运算
In modeling packages, basic geometric objects such as the cube or 'box', sphere or ellipse, torus, and a number of other shapes that can be described using a mathematical formula, are commonly known as primitives. These objects can typically be described by a procedure which accepts some number of parameters; for example, a sphere may be described by the coordinates of its center point, along with a radius value. These primitives can be combined into compound objects using operations like these:
Applications of CSG
Constructive solid geometry has a number of practical uses. It is used in cases where simple geometric objects are desired, or where mathematical accuracy is important. The Unreal engine uses this system, as do Hammer (the mapping engine for the Source engine) and Quake. (Hammer actually started out as Worldcraft, which was an editor for Quake.) BRL-CAD is a solid modeling CAD package that is fundamentally based on CSG modeling techniques. CSG is popular because a modeler can use a set of relatively simple objects to create very complicated geometry. When CSG is procedural or parametric, the user can revise their complex geometry by changing the position of objects or by changing the Boolean operation used to combine those objects.
示例程序
外部链接
- GNU Triangulated Surface library - an opensource (LGPL) library featuring CSG capabilities on triangle meshes.
- Computational Geometry Algorithms Library - an opensource (LGPL, QPL) library featuring, among other, CSG capabilities.