摘要 |
A system for creating a constructive solid geometry (CSG) representation of objects in bit map or voxel form iteratively creates, mutates and optimizes a population of potential CSG representations of the object. The system includes a first part which randomly generates and revises a population of CSG representations. Each CSG tree includes a random number of primitives of different types, sizes and positions. The primitives are randomly organized in a tree structure which includes randomly selected boolean operators at the nodes. The trees are modified through an evolutionary process to improve the CSG representation of the object. Trees are randomly mutated to form new trees. Mutations can include (1) changes in types of primitives, (2) changes in a subtree structure, (3) addition of new subtrees, and (4) deletions of subtrees. If the new tree better represents the object, then the old tree is replaced with the new tree. Mutations continue until no further improvements are obtained. The population may be periodically reinitialized by replacing the worst trees with the best trees. A second part of the system locally optimizes each tree upon creation or mutation. Optimization includes iterative modification of the size, position, and orientation of each of the primitives in a tree in order to better represent the object. The representation can be judged based upon the number of primitives, and the number of voxels in the representation which are not in the object and in the object which are not in the representation.
|