4.5 The Continuous Model Synthesis Algorithm
4.5.6 Assigning Consistent Labels
The remaining steps in the continuous model synthesis algorithm (Lines 5-9 of Algorithm 4.1) follow essentially the same procedure as discrete model synthesis. The algorithm uses a catalog of possible labelsCMt. Initially,CMt contains every possible assignment of
labels to each edge and edge vertex as computed in Sections 4.5.1 - 4.5.4. Assignments are gradually removed from CMt until each edge and vertex is assigned only one valid
label. Once all the assignments have been made, M has been computed.
Initially, no labels are assigned and CM is full of many possible labels. At each edge
or vertex, we randomly select a single label from among the choices found in CM. The
selected label is assigned toM and then CM is updated.
An overview of the algorithm is given in Figure 4.22. Figure 4.22(a) depicts the initial configuration ofCM. Initially, every face, edge, and vertex has all possible labels
present. In this example, we take a set of edges and vertices which are highlighted in yellow and assign labels to them. These assignments reduce the set of possible adjacent labels. From Section 4.5.5, we know that only certain labels are allowed to be neighbors and so we find assignments that disagree with their neighbors and remove them. The result after the first removal is shown in Figure 4.22(b). Removing these assignments reduce the set of possible labels in other edges and vertices, which compels us to remove more labels. We continue to remove labels until there are none left that need removing as shown in Figure 4.22(c). We continue to pick and assign labels from CM and then
updateCM. This continues until every edge and vertex has been assigned a single label.
The shape produced in Figure 4.22(c) achieves the desired result of a triangle that is similar to the input triangle in Figure 4.10(a) and satisfies the adjacency constraint everywhere.
This procedure has much in common with discrete model synthesis including the possibility of the failure cases. It is possible that the algorithm may make an incorrect assignment that causes the list of possible assignments CM to become empty. In this
case, the algorithm has not computed a valid and consistent set of assignments. We discuss these types of failures in Sections 3.3.4-3.3.7, so we do not revisit this issue in any detail. If a failure occurs, we use the strategy introduced in Section 3.3.6 which is instead of creating the whole modeling space in one pass, we modify small blocks of the model as shown in Figure 4.23. The algorithm is much less likely to make an incorrect assignment if it is modifying only a small part of the model. Empirically, we have found that our algorithm often succeeds when modifying a volume of 10 x 10 x 10 or smaller (in units of plane spacings). Sometimes the algorithm works when modifying huge volumes, since there are infallible input models which never cause failures such as those shown in Figures 4.35, 4.28 - 4.32. But even in the worst case, there is never a possibility that an over-constrained input would cause an immediate failure since at least one solution exists for all inputs. A solution must only satisfy the adjacency constraint. The input model trivially satisfies the constraint as do stretched copies of the input. A solution can always be found, although it may be necessary to modify the output in small blocks to find it.
4.5.7
Time and Space Complexity
The time and space complexity of continuous model synthesis depends upon the number of distinct face normals and the number of parallel planes created for each normal. The number of normals is called m and the number of planes for each normal is called n. The value of n depends on the volume of the output model and how far apart the planes are spaced. The output volume and the plane spacing are both specified by the user. Increasing the output volume has the same effect as decreasing the plane spacing. Wherever three planes intersect, a vertex is created. The number of vertices is less than or equal to m3n3. The number of vertices is lower when some sets of three planes do not intersect. For example, if the input model is am−1 sided prism, then number of vertices is m−21
(a) We begin by allowing all possible labels to be at every face, edge, and vertex. Then we assign a few labels to the highlighted locations.
(b) Using Section 4.5.5, we remove adjacent labels that are incompatible with the previously assigned labels.
(c) After labels are removed, their removal causes other labels to be removed. The result after all incompatible labels have been removed is a triangle.
(a) Initial model with exterior assign- ments. (b) Clear as- signments in part of the model. (c) Modify part of the model. (d) Clear a new part.
(e) Modify new part.
Figure 4.23: This figure shows how the model can be created by modifying only part of the model at once. Each part is modified so that it is consistent with the rest of the model along the border. This is similar to Figure 3.9 in the discrete case.
the algorithm. The number of vertices, the time complexity, and the space complexity are all O(m3n3) and Ω(m2n3). In practice, if m is fairly low, very large and complex models can be generated in a few minutes at most.