跳转到内容

构造实体几何

维基百科,自由的百科全书

这是本页的一个历史版本,由Sterrys留言 | 贡献2006年11月9日 (四) 01:00编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
File:Tron Lightcycles.jpg
The light cycles from the movie Tron were constructed using Constructive Solid Geometry

构造实体几何(英文为 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:

Operations in constructive solid geometry
Boolean union Boolean difference Boolean intersection
Demonstration of CSG Union Demonstration of CSG Difference Demonstration of CSG Intersection
The merger of two objects into one. The subtraction of one object from another. The portion common to both objects.


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.

示例程序

外部链接