CHAPTER 3 Background
3.2 Designing Process of Origamic Architecture
Figure 3.1: Origamic architectures creations of architectures worked by Masahiro Chatani.
The topics of origamic architecture are extensive, ranging from geometric parallel patterns or world famous buildings (shown as Figure 3.1) to animals and plants. Buildings are mostly regular structured and with clear layering. With these features, designing origamic architecture of buildings is much simpler than animals. However, the origamic architectures creations of animals can be more touching than buildings. Figure 3.2 shows the origamic architectures of animals created by Masahiro Chatani.
Figure 3.2: Origamic architectures creations of animals worked by Masahiro Chatani.
3.2 Designing Process of Origamic Architecture
In this section, we observe the process of designing origamic architecture and illustrate our concept of algorithm in constructing an origamic architecture.
9
Analyzing origamic architectures of Chatani [5], we summarize the following steps for designing origamic architecture for animals:
1. Decide the depths of patterns.
2. Put patterns onto the layout according to their depths and form the layers.
3. Create connections between layers.
As Li [20] defined, two outer regions that meet at the central fold called backdrop and ground. Li [20] first discussed the behavior of patches that parallel to backdrop and ground
in an origamic architecture, and then constructed origamic architecture by these patches to approximate shape of input model under the rule of stability. In this way, for models which are regular in shape and consist of straight lines or planes which are mutually parallel to each other such as architectures, the algorithm performs well. However, for models which are consisted of smooth curves and irregular surfaces, the algorithm of Li [20] will fail. For Li[20] only approximating the shape of model by two directions of patches under the constraint of origamic architecture. Therefore, for models such as animals whose normal direction are various on surface, the result of approximation will not be pleasant.
Therefore, we propose a concept of layers and connections. We define the patterns parallel to backdrop as layers for illustrating features of models in shape, and the patterns parallel to the ground as connections between layers. When users open the origamic architecture by moving background and backdrop, the patterns will “pop-up” along the fold lines. Figure 3.3 shows layout of origamic architecture. The yellow regions are called backdrop, the blue regions are called gound. The red regions are layers, and green regions are connections between two layers.
We illustrate the features of animals by layers which are parallel to backdrop, and connect these layers for ensuring the stability of origamic architecture.
10
Figure 3.3: Origamic architecture layout of kangaroo [5].
In Li [20], the stability of origamic architecture is defined on patches which may have two directions. Therefore, the definition for stability will be complex and difficult to understand. In this thesis, we concentrate on relationships between layers and ground or backdrop, and we obtain a clearer and simpler rule for determine stability of layers as follow:
1. If a layer has connection with both ground and backdrop, it is stable.
2. If a layer has connection with ground or backdrop, and having connection with a stable layer, it is stable.
3. If a layer has no less than two connections with different stable layers, it is stable.
If all the layers are stable, the origamic architecture is called stable. A simple example is shown in Figure 3.4. There are two layers in this example. The former layer connects with both ground and backdrop. So it is a stable layer. The latter layer has connection with a stable layer (the former layer) and backdrop. Thus it is also a stable layer. As a result, this origamic architecture is stable because the layers in it are all stable.
11
Figure 3.4: A simple example of stable origamic architecture from [20].
12
CHAPTER 4
Layers Generation
In this chapter, we describe how to get segmentations from the input model, and how to generate layers of origamic architecture with easy user operations. Figure 4.1 shows the flowchart of layers generation.
First, the system will do orthogonal projection of the 3D model input by user and then render the projected model by bi-level shading. User can move the light source and model at ease. After user determines the directions and positions of light source and model for generating origamic architecture, the system will detect edges of depth map and rendering result. The extracted edges will segment the image of input model into pieces, and then the system will colorize these pieces with different colors. User can merge the broken pieces by simple operations. Finally, the system will compute the depth of each merged piece, and these pieces will be outputted as layers of origamic architecture.
This chapter is organized as follows. In section 4.1, we segment the input model through the rendering results of bi-level shading and depth map. Then we describe the generation of layers in section 4.2.
13
Figure 4.1: The flowchart of layers generation
14 bi-level shading. We define the color C of the model:
0, · 1, · (4.1)
where n is the normal of a point on the model surface; l is the direction of light; k is the threshold value between 0 and 1.
We use Canny edge detector [3] to detect edges of the result of bi-level shading, and separate the image of model into pieces. On the other hand, we also detect the edges of the depth map by Canny edge detector. Before applying Canny edge detector, the shading of the depth map will be changed as follows:
, 0, 1 (4.2)
Where and are current and new magnitude of a pixel in depth map respectively, α and β are parameters which change the shading of the depth map and are controlled by the user.
When detecting edges of a depth map, user can control two threshold values h and l of edge detector, as shown in Table 4.1.
Parameter Function
h An upper threshold. If the magnitude of a pixel is value, then it will be considered as an edge pix l A lower threshold. If the magnitude of a pixel is
value, then it will be considered as a non
Table 4.1
Figures 4.2 and 4.3 show examples of different parameter settings of depth map an edge detection. By different settings, the result of detected edges shows different features of the input model.
(a)Original depth map
Figure 4.2
(a) Original image α = 4.12, β = 0.23
Figure 4.3: Results of Canny edge detection with different parameters
15
An upper threshold. If the magnitude of a pixel is larger value, then it will be considered as an edge pixel.
A lower threshold. If the magnitude of a pixel is smaller value, then it will be considered as a non-edge pixel.
Table 4.1: Parameters in edge detection.
4.2 and 4.3 show examples of different parameter settings of depth map an different settings, the result of detected edges shows different features of
(b) α = 4.16, β = 0.27 (c) α = 4.94,
2: Depth maps with different parameters α and
(b) h = 0.14, l = 0.0 (c) h = 0.67,
esults of Canny edge detection with different parameters larger than this
smaller than this
4.2 and 4.3 show examples of different parameter settings of depth map and different settings, the result of detected edges shows different features of
= 4.94, β = 0.24
and β.
0.67, l = 0.28
esults of Canny edge detection with different parameters h and l.
16
Then the system will separate the image of input model into segments by edges of bi-level shading and depth map, and apply erode operation to each segment in order to remove insignificant pieces. Finally, we colorize each survival segment with different color and expand each segment iteratively until segments touch each other or the border of model image.
Moreover users can choose neighboring segments arbitrarily and merge them into one segment. The final segments are imported into the process of layers generation. Figure 4.4 shows the results of model segmentation with and without merging segmentations by user.
(a) (b)
Figure 4.4: Results of model segmentation with and without merging neighboring segments.
(a) Initial result of model segmentation. (b) Refined result of model segmentation by merging segments.
4.2 Layers Generation
In this section, we introduce the process of layers generation and the deletion of unreasonable layers.
17
4.2.1 Layers Initialization
For each segment obtained in Section 4.1, the system will calculate the depth value of each segment according to the new depth map. We define the initial depth of each segment as:
∑%&'(!"#$
' (4.3)
where Si is the set of pixels in segment i, )is the number of pixels of Si, and is the depth value of new depth map.
4.2.2 Layers Refinement
For building stable origamic architecture, the first thing we should take into account is the hierarchical structure of layers. A stable layer in origamic architecture should be supported by ground or another neighboring layer which is shallower than it at contacting points. Consider Figure 4.5. L2 has two neighboring layers L3 and L4 which are shallower than L2 at contacting points. As a result, L3 and L4 become supporting layers for L1. Therefore, we construct a bottom-up hierarchical structure to ensure the stability of layers.
18
Figure 4.5: Example of origamic architecture with all layers stable.
First, we construct a directed graph which records the connections between layers where:
A node represents a layer.
The root of the graph is a pseudo node which points to layers that touch ground directly.
Each edge points from node P to node Q represents that P and Q are neighboring layers and P is shallower than Q.
For the layer which does not have parent which is shallower than it, we merge it into its neighboring layer which is closer than other neighbors in depth field.
Then we determine the depth of each layer. To make origamic architecture look stereo and layered, we sort the layers by their depth value * and define new depth value * as:
* *+, - · , 0 . i )* (4.4)
Where NL is amount of layers, L is the sorted array of layers and * *01, and - is a
19
constant value.
Finally, we can define relationships between layers and folding line in origamic architecture, and put layers onto the layout. The position of folding line represents the depth of backdrop. As backdrop is deeper than all layers, we define the depth of backdrop as:
2345678 *+, - · )* (4.5)
For allocate the position of layers onto the layout, we define the following equations:
9:; 9<;
=:; ><;, =<; (4.6)
Where z(3D) represents the depth value of layer. Figure 4.5 shows the coordinate systems of 3D origamic architecture and 2D layout.
Figure 4.6: Coordinates of 3D origamic architecture and 2D layout.
Figure 4.6 shows the result of allocating layers onto layout according to the result of model segmentation and its corresponding depth map. If one layer in the layout is overlapped by other layers and splitted into pieces, the system will cut this layer and split it
into new layers which share the same depth.
(a) Result of model segmentation.
(c) Results of allocating layers onto layout of origamic archit
Figure 4.7: Result of allocating layers according to model segmentation and its corresponding depth map.
20
into new layers which share the same depth.
(a) Result of model segmentation. (b) Depth map corresponding to model segmentation.
Results of allocating layers onto layout of origamic architecture.
Result of allocating layers according to model segmentation and its
Folding Line
(b) Depth map corresponding to model
ecture.
Result of allocating layers according to model segmentation and its
Folding Line
21
CHAPTER 5
Layout Generation
In this chapter, we describe process of generating connections between layers and method to ensure the stability of the origamic architecture. Figure 5.1 shows the flowchart of layout generation.
First, the system will analyze contours between layers and compute scores of two kinds of connection: horizontal connection and vertical connection. According to the result of scores, the system will pick up segments which lie on border between layers and decide how to generate connections. Then these connections will be put onto the layout of origamic architecture by taking overlap of connection into consideration. After putting all available connections onto layout, the system will test stability of origamic architecture. If the origamic architecture is stable, the layout will be output as result of layout generation.
Otherwise, the system will choose an unstable layer and merge it with another layer and re-generate the layout.
The rest of this chapter is organized as follows. In Section 5.1 we introduce two types of connection used between layers, horizontal connection and vertical connection, and describe generating process of connections in Sections 5.2 and 5.3 separately. In Section 5.4 we describe how to ensure stability of origamic architecture and output layout.
22
Figure 5.1: The flowchart of layout generation.
5.1 Analysis of Connections
In this section, we analyze features of connections between layers from examples of Chatani [5], and conclude with a rule for generating connections between layers.
For generating connection between two layers, first we should know the position where the connection is located at. Figure 5.2 illustrates a simple condition for connecting two layers L1 and L2. In Figure 5.2, L2 and L1 are two layers and L2 is in front of L1 and lower than L1. C is a connection between L1 and L2 which is located at the bottom of L1 and the top of L2.
If we would like to locate another connection C’ between L2 and another layer which is
23
in back of L2 and lower than L2, we will find that there is no more space of origamic architecture to form connection C’. Therefore, we conclude that a layer cannot form connections, to forward or backward, at top and bottom of the layer simultaneously. As a result, for all pairs of layers in origamic architecture, we generate connections from top of the front one to bottom of the back one.
Figure 5.2: A sketch illustrates the location of connection between L1 and L1’s supporting layer L2.
Then we find that there are two major kinds of connection: horizontal connection and vertical connection. An horizontal connection often lies on segment of border which is near-horizontal, and a vertical connection often lies on a near-vertical segment of border.
Figure 5.3 shows different examples for horizontal connection and vertical connection.
Therefore, we propose a method for extracting the segments of border between layers, and classify these segments for different kinds of connections.
24
Figure 5.3: Examples for two major kinds of connections in origamic architecture [5].
First, we compute scores for horizontal connection SH and vertical connection SV of each point x of layer’s contour as follows:
?@AB, 9 |D78E$|1
, δ
11G δ
12(5.1)
?IAB, 9 |JKL9|
, δ
21G δ
22(5.2)
where δij is a constant for striking a balance between SH and SV. Figure 5.4 shows the result of computing SV and SH. For segments which are greenish, the system will generate vertical connections. Otherwise, horizontal connections will be generated for reddish segments.
25
▬▬ Score of horizontal connection ▬▬ Score of vertical connection
Figure 5.4: Scores of contour for horizontal connection and vertical connection of Stanford bunny model.
For each layer L, we choose a point x which has the highest score in the sequence of contour points, either SV of SH, as the seed of connecting segment. The segment extends for continuous points 9B if :
?@A, 9EE ?IA, 9EE G ?@A, 9B ?IA, 9B M 0 (5.3) and )*9B N )*9EE , γ1 < i < γ2 (5.4)
where connecting segment ranges from 9O1 to 9OP and N(x) indicates the neighboring layer of L at point x.
After extracting a connecting segment, the scores along this segment will be set to zero.
Then the system will extract next connecting segment until there is no more segment to extract. As a result, the contour of layer L will be cut into several segments. These segments are classified into two groups, horizontal connection and vertical connection, according to the higher score of segments. As a result, connections will be generated in different ways according to the groups these segments belong to.
26
As discussed in section 5.1, connections will be only generated at top of front layer and bottom of back layer. In this thesis we only discuss connections which generated backward.
Therefore, the connecting segment which located at bottom of front layer and top of back layer will be neglected. While generating connections for a pair of layers, we define the front one as the source layer, the back one as the target layer, and difference of depths between source layers as |D|. Moreover, holes on the layout between source layer and target layer will be filled with the color of target layer to avoid fragments of the layout.
5.2 Horizontal Connection Generation
In this section, we introduce how to generate horizontal connection between layers.
Figure 5.5 shows the process of generating horizontal connection.
Given a horizontal connecting segment extracted from Section 5.1, the system will first find a sub-segment Si which has the widest axis-aligned bounding box QRS with its height
≤ :
<κ. Then the system will create an examining area E with its bottom aligned with QRS’s bottom, and set its height as |D|and width as the width of the layer, as shown in Figure 5.5 (b) .
As a result, the system can find a segment at the bottom of E which includes the bottom of QRS and has intersection with the source layer, as shown in Figure 5.5(c). For this segment, called connecting base, the system generates a connection with the top wider than connecting base, as shown in Figure 5.5(c), and defines the score of erosion ∆ for it:
27
Δ
(!'ℓ U * (5.5)where ℓ means length of connecting base, and N(x) means the number of pixels of x.
If the score is smaller than a threshold value ε, then this connection is generated. Otherwise, for reducing the score of erosion, QRS will be moved upward slightly as QRSW and the system will regenerate the connection until QRSW has no intersection with QRS, the system will abandon this connecting segment.
(a) Widest sub-segment Si and its bounding box.
(b) Creation of examining area.
(c) Segment (green) for generating horizontal connection.
(d) Construction of horizontal connection.
Figure 5.5: Generating process of a horizontal connection.
28
After generating a connection, the system will examine the layout and eliminate the connection according to the following rules:
1. The connection should not overlap with any layer which does not belong to source layer or target layer.
2. If target layer will be broken into pieces after generating connection, the connection will be eroded horizontally, as shown in Figure 5.6, to make the target layer continuous.
Figure 5.6: When target layer (gray) is broken by the connection, the connection will be eroded horizontally to make the target layer continuous.
If the eroded connection touches the source layer and target layer without broken, then the connection will be retained. Otherwise, the connection will be abandoned.
5.3 Vertical Connection Generation
From the example in Figure 5.3 (b), we find that the process of generating a vertical connection consists of the following steps, as shown in Figure 5.7:
1. Choosing a segment of contour between two layers with its height equals to |D|. 2. Putting a vertical connection on the source layer side.
3. Pushing target layer toward source layer along the border higher than the
29
connection.
(a) Source layer (red) and target layer (pink) before generating connection.
(b) Putting connection on the source side. (c) Moving border from target layer toward source layer.
(d) Result of generating vertical connection.
Figure 5.7: Generating process of vertical connection.
Therefore, given a vertical connecting segment, we split it into three parts: source layer ensuring part, connecting part, and eroding part. Figure 5.8 shows an example of segment
30
separation.
Figure 5.8: The vertical connecting segment is splitted into three parts. Bottom to top:
source layer ensuring part (blue), connecting part (green), eroding part (red).
First we eliminate the bottom side of the connecting segment to ensure that the space of source layer is under the connection. Then the system puts the connection from the bottom of remaining segment with its height equals to |D|and user-defined width. As a result, the system generates eroding part for the rest of segment SE. The width of eroding part WE is calculated as:
XY9 X!GZ$@ (5.6)
where x is a point of SE, h is the height of x from bottom of SE , and H is the height of SE.
where x is a point of SE, h is the height of x from bottom of SE , and H is the height of SE.