Refolding Planar Polygons. Copyright Spring by Hayley Nicole Iben

Size: px
Start display at page:

Download "Refolding Planar Polygons. Copyright Spring by Hayley Nicole Iben"

Transcription

1 Refolding Planar Polygons Copyright Spring 2005 by Hayley Nicole Iben

2 i Abstract Refolding Planar Polygons by Hayley Nicole Iben Master of Science in Computer Science University of California at Berkeley Professor James F. O Brien, Research Advisor This work describes a guaranteed technique for generating intersection-free interpolation sequences between arbitrary pairs of non-intersecting planar polygons. The computational machinery that ensures polygons are free from self-intersection is built upon a repulsive energy function we presented in [6]. This machinery guides a user-supplied distance heuristic that determines the overall appearance of the interpolation sequence. Additionally, the user can provide a set of algebraic constraints that are enforced throughout the interpolation sequence. These constraints include distance constraints, constant edge lengths, and edge lengths changing monotonically.

3 iii Contents 1 Introduction 1 2 Background 4 3 Unfolding Polygons Existence of Unfolding Motions Energy Functions Examples Refolding Polygons Energy and Parameterization The Algorithm Direction Heuristics Energy Projection Constraints Correcting Constant Edge Lengths Results and Discussion 27 Bibliography 35

4

5 1 Chapter 1 Introduction This work describes a technique for generating an intersection-free interpolation sequence between two planar, non-intersecting input polygons. Our method is guaranteed to always find an interpolation path between two arbitrary polygons where the generated path contains polygons that are free from self-intersection. The computational machinery that ensures polygons are intersection-free guides a user-supplied direction heuristic, determining the overall appearance of the interpolation sequence. Additionally, the user can specify algebraic constraints, such as edge length or distance constraints, that should be satisfied at each step of the generated animation sequence. The combination of these control mechanisms provides the user with a method to produce attractive interpolation sequences. Our interpolation method relies on results from [9] and [23] showing that any planar collection of polygons and polylines can be unfolded to outer-convex configurations. These results show that a single polygon can be continuously deformed to a convex polygon while maintaining constant edge lengths and avoiding self-intersecting polygons. However, the motions implied by [9] and [23] are difficult and expensive to compute directly. Using these results, we presented a technique in [6] using a much simpler class of motions. Our method can efficiently compute a motion to unfold a planar collection of polygons and polylines to outer-convex configurations. These motions are

6 2 Figure 1: An intersection-free interpolation sequence generated using our algorithm. For this example, all edge lengths were held constant, the linear interpolation of vertex positions as a function of time was used for the direction heuristic, and the total computation time was 2.3 minutes. easily computed and correspond to the downward gradient of a repulsive energy function based on the vertex-to-edge distances within the polygon. This unfolding algorithm is briefly discussed in Chapter 3. In our algorithm, each polygon configuration has N vertices and can be represented as a vector of length 2N by interleaving the x and y coordinates of the vertices. Using this representation, a polygon A with N vertices is considered a point in the R 2N space of possible configurations of A, denoted X(A). The configurations of A that do not contain self-intersections lie in the embedded configuration space, EX(A). Creating an interpolation sequence between two input polygons is essentially creating a path between the two points representing the polygons in this high-dimensional configuration space. The unfolding results provide an obvious way to build a path from one polygon to another because one can trivially interpolate between any two convex polygons [2]. The existence of this path guarantees that our refolding algorithm can always construct an intersection-free sequence between any two polygons. However, this worst-case path is not particularly interesting because computing an interpolation path where some intermediate polygons are convex is probably not useful for most applications. Our refolding algorithm uses a direction heuristic supplied by the user to generate a more desirable path. This heuristic suggests how to change between the two polygon shapes. Using only this heuristic to interpolate between polygons would produce sequences with self-intersections. However, the refolding algorithm presented here uses the repulsive energy function to steer this heuristic around self-intersections, as demonstrated by Figure 1 and the examples in Chapter 5. Because the energy function

7 3 provides a guiding framework, the direction heuristic can be quite simplistic and still produce good results. Even the trivial heuristic that would simply move the vertices on a straight line to their target location would suffice. A direct interpolation path is one that follows this direction heuristic exactly. Our method attempts to generate the most direct interpolation path between two polygons while avoiding self-intersections. In addition to selecting a direction heuristic to control the appearance of the generated sequence, the user can impose algebraic constraints on the polygons. For example, the edge lengths can be constrained to remain constant throughout the animation, provided that the input polygons have equal edge lengths. When the input edge lengths are different, they can be constrained to change monotonically over the course of the animation sequence. Because the energy function we use is from the unfolding theory, the algorithm can always satisfy these two types of edge length constraints. Our algorithm satisfies other types of constraints, such as distance constraints, as much as possible in a least-squares sense as long as they do not violate the requirement that the polygons are intersection-free. The flexibility present in our algorithm through the constraints and direction heuristic provides the user with a powerful tool to generate interesting polygon interpolation sequences.

8 4 Chapter 2 Background The task of interpolating between polygons is often divided into two subproblems: establishing vertex correspondences and computing vertex paths. In some cases, for example [21] and [7], researchers have focused primarily on establishing vertex correspondences while using a simple method, such as linear interpolation of the vertex positions, to create the intermediate polygons. In this work, we do not address algorithms for finding vertex correspondences. We assume that some other algorithm, or the user, will supply suitable correspondences. So long as the correspondences order the vertices consistently our interpolation algorithm is guaranteed to succeed. Other approaches have focused on more sophisticated interpolating schemes for computing vertex paths. In [20], intermediate frames between two shapes are computed by linearly interpolating the vertex angles and the edge lengths, giving better results for rigid transformations than previous work using vertex positions. The authors of [12] create a multiresolution representation for each input polygon. Their algorithm interpolates between these representations to create the intermediate polygons. The method described in [22] decomposes each input polygon into a planar tree of star-shaped pieces, called a star skeleton. The points of the star skeleton, represented in polar coordinates, are linearly interpolated to create the intermediate shapes. In [3], Alexa, Cohen-Or and Levin decompose the input objects into compatible triangulations. They then compute

9 5 transformations between the triangulations that minimize local distortion. None of these methods guarantee that the intermediate polygons they generate will be intersectionfree. Both [14] and [11] generate non-intersecting sequences for limited types of input. The method in [14] operates on pairs of polygons that have corresponding parallel edges. The method in [11] operates on simple polylines. A more general method appearing in [13] embeds the polygons inside a convex region, generates a pair of compatible triangulations, and then builds a sequence between them by interpolating the stochastic matrices whose unit eigenvectors encode the triangulations geometries. In a related approach [24], the matrix representations are used to generate a morphing sequence where the trajectories of the interior vertices are linear with constant velocities, or as close to linear as possible. This approach enables additional control over the morph, such as forcing the sequence through an intermediate triangulation. Like the method we present here, these methods can guarantee that all intermediate polygons will not intersect themselves. In [25], Surazhsky and Gotsman present a method to generate a more natural-looking morph between compatible triangulations by interpolating the angles and edge lengths when computing the intermediate mean value barycentric coordinates. This enables morphing between two stick figures. Like the method presented here, the method by Surazhsky and Gotsman [24] creates a morph sequence that is guaranteed to be intersection-free; however, the types of user control of the animation sequence differs between the two methods. Our algorithm ensures that interpolation sequences will be intersection-free, and it also decouples vertex correspondence and path computation from intersection avoidance. Intersection avoidance does, of course, affect the vertex paths, but the user is free to supply a direction heuristic that will generate whatever type of path they like. The intersection avoidance machinery only interferes to the extent required. Thus, one could see our method either as an independent interpolation method, or as a wrapper to be used with any of the above methods that generate interesting, but

10 6 possibly intersecting, vertex paths. For example, the algorithm in [3] produces paths that avoid needless distortion, but that might intersect. If combined with our method, we expect that the resulting algorithm would produce predominantly rigid-as-possible motions that distort only as needed to avoid intersection. In addition to methods that operate directly on explicit polygonal representations, several other methods for interpolating shapes have been described in the literature. Both [26] and [8] interpolate between shapes by interpolating scalar fields that implicitly define the shapes. The authors of [15] and [16] discuss methods for interpolating volumetric data. A method based on Minkowski sums appears in [18].

11 7 Chapter 3 Unfolding Polygons Our polygon interpolation method builds upon a technique we presented in [6]. That technique can efficiently compute a motion for a planar collection of polygons and polylines that unfolds the collection to outer-convex configurations. A configuration is outer-convex if it is straight when it is a polyline or convex when it is a polygon. All polygons or polylines that are not contained inside another polygon are separated from each other. Given intersection-free input, the unfolding algorithm generates a motion that should preserve edge lengths and be free from self-intersection. 3.1 Existence of Unfolding Motions The existence of unfolding motions in 2D has been proven independently by Connelly and Demaine in [9] and Streinu in [23]. These papers utilize two distinct constructive approaches to prove this existence. However, these motions are expensive and can be difficult to compute. The approach by Connelly and Demaine [9] used a strictly expansive motion to find the convex shape, meaning that the motion strictly increases all of the distances between vertices not sharing an edge. They also proved that strictly expansive motions will always exist except when the polygon is already convex. However, they did not establish a time bound on their algorithm. The approach given by Streinu [23] computes many algebraic motions that each require exponential time

12 8 to compute, giving an exponential time bound for generating unfolding motions in this manner. 3.2 Energy Functions Given the existence of strictly expansive motions, Cantarella, Demaine, Iben and O Brien [6] redefined the unfolding problem as one where we increase the distance between all vertices not sharing an edge on average at each step. We minimize an appropriate energy function to create the unfolding motions. Our energy function is a function from the embedded configuration space EX(A) to the nonnegative real numbers R +. The energy function our method requires satisfies the following four properties: Charge The value of the energy function is finite for any intersection-free configuration and approaches + as the polygon approaches self-intersection. Repulsive The value of the energy function decreases under any strictly expansive motions, meaning that following the downward gradient of the energy function decreases energy. Separable As distinct connected components recede from each other, their interaction energy decreases. Lipschitz Continuity An energy function E is C 1,1 in the interior of EX(A) if it has a gradient vector field, and on every closed subset of EX(A), that gradient field obeys a Lipschitz condition with some Lipschitz constant α. That is, we require that E(p) E(q) α p q (3.1) on each closed subset of EX(A). Once we have an energy function satisfying these properties, it is easy to show that a simple optimization strategy, such as gradient descent, can be used to minimize

13 9 (a) A spiral open chain. (b) Teeth. (c) Tree. Figure 2: Examples of unfolding motions where the input has been (a) straightened or (b,c) convexified. To maximize visibility, the animation zooms as time proceeds; all edge lengths remain constant. this function. From Connelly and Demaine [9], we know that there are no local minima in the space of valid configurations EX(A), so minimizing our energy function produces an intersection-free path from any polygon to a convex polygon. Their results imply that the energy function does not contain any critical points in the embedded configuration space EX(A) that are not already in their outer-convex configuration. We can also infer that this space is simply connected. A detailed convergence proof with a polynomial time bound for generating unfolding motion appears in our paper [6], but in summary, for a single polygon: 1. By charge, the energy function is finite for any valid initial polygon and the energy function approaches + as the polygon approaches self-intersection. So, any path that starts with a non-intersecting polygon and strictly decreases the energy cannot lead to a self-intersection.

14 10 (a) Tentacle. (b) Spider. Figure 3: Examples of the unfolding algorithm s ability to handle large input sizes (380 vertices). To maximize visibility, the animation zooms as time proceeds; all edge lengths remain constant. 2. By repulsion, an expansive direction in configuration space is a direction that decreases the energy, and from [9] we know that such a direction always exists unless the polygon is already convex. Therefore, the gradient can never vanish except for convex polygons, and there can be no local minima or saddle points in the energy function except a convex configuration. Together these two observations guarantee that any continuous path of monotonically decreasing energy starting from any intersection-free polygon converges to a convex polygon, and that at no point along the path does the polygon intersect itself. 3.3 Examples The unfolding motions are easily computed by the algorithm presented in [6] as they involve a straightforward computation of the downward gradient of a repulsive energy function. In that paper, we use an energy function based on the elliptic distance between edges and vertices, demonstrated in the above figures. Figure 2 illustrates the intersection-free unfolding motions of open linkages and polygons. Figure 3 demonstrates that the unfolding algorithm is scalable in the number of input vertices. The running times and numbers of vertices for these examples are given in Table 1.

15 11 Figure # vertices Time (sec) 2 (a) Spiral open chain (b) Teeth (c) Tree (a) Tentacle (b) Spider Table 1: Running times for the C++ implementation of our unfolding algorithm, measured in CPU seconds on a 3.02 GHz Pentium IV with 1 GB of memory. Although [6] uses an elliptic energy function, any energy function satisfying the properties described in Section 3.2 can be used to produce these unfolding motions. For our refolding algorithm, we use an energy function based on the Euclidean distance between edges and vertices, as described in Section 4.1.

16 12 Chapter 4 Refolding Polygons Because one can trivially interpolate between any two convex polygons, the energy-based unfolding algorithm briefly discussed in Chapter 3 provides an obvious way to build a path from one polygon to another. Our refolding method builds from this energy-based unfolding algorithm. In the worst case, the algorithm will unfold each of the polygons and trivially interpolate between their convex shapes, producing the sequence begin-polygon convexified-begin-polygon convexified-end-polygon endpolygon. The existence of this path guarantees that our refolding algorithm can always construct an intersection-free sequence between any two polygons. This worst-case path is not particularly interesting, so in addition to the energy function framework, the refolding algorithm presented here incorporates a user-supplied direction heurstic to generate a more desirable path, described in detail in Section 4.3. This direction heuristic provides the user with control over the character of the motion. Additional control is provided by allowing the user to specify algebraic constraints that should be satisfied throughout the interpolation, described in Section 4.5. These two components gives the user some aesthetic control over the generated interpolation sequence.

17 13 (x, y ) 6 6 θ 6 (x, y ) 7 7 (x, y ) 4 4 (x, y ) 3 3 (x, y ) 5 5 e 6 θ 7 e 5 θ 4 e 3 e 4 θ θ 3 5 e 7 (x, y ) 8 8 (x, y ) 1 1 (x, y ) 2 2 e 8 e 1 θ 1 e 2 θ 2 Figure 4: The left image shows the polygon parameterized in terms of the vertex positions. The right image uses a set of joint angles and edge lengths to parameterize the polygon. 4.1 Energy and Parameterization The interpolation sequences generated by the refolding algorithm are free from self-intersecting polygons because we use the criteria listed in Section 3.2 to define an energy function used by our algorithm. In [6], we defined an energy function based on the elliptic distance between edges and vertices. That energy function was preferable in that situation because it is C 2 continuous, which facilitated us in placing an actual bound on the worst-case number of Euler steps that may be required to perform the unfolding. The unfolding algorithm also used an angle-based parameterization, depicted in Figure 4, so that we could guarantee that all edge lengths were preserved exactly throughout the animation. In this algorithm, we prefer to use an energy function based on the Euclidean distances between edges and vertices because it converges faster in practice. We also prefer to parameterize the polygon using the vertex positions directly. Any edge length requirements, such as maintaining constant edge lengths, are enforced using constraints with some negligible error (see Section 4.5). This simplifies interpolation between polygons that have different edge lengths and also preserves any symmetries present between the input polygons because all edges are treated equally.

18 14 To define the energy of a polygon A with N vertices, let v i with i [1... N] represent the positions of the vertices and let e j be the edge between vertices v j and v j+1. 1 The energy corresponding to the polygon s configuration is then given by E(A) = N i=1 N j=1 j i, j i 1 1 dist(v i, e j ) 2, (4.1) where dist(v i, e j ) is the smallest Euclidean distance between vertex i and any point on edge j. It is easy to verify that this energy function is charge, separable, C 1,1, and, except for the degenerate cases where N 4, repulsive. Given these properties, this energy function is also able to unfold polygons to convex shapes. For the refolding algorithm, we need to compute the gradient of this energy function. Let J = j + 1, so e j is the edge between vertices v j and v J. Also let l j be the length of edge e j and let v i / e j, Using these variables, we can rewrite the energy function from Equation (4.1) as η = η ij = N i=1 N j=1 j i, j (i 1) η ij α ij if (v i v j ) (v J v j ) < 0, β ij if (v i v J ) (v j v J ) < 0, γ ij otherwise, (4.2) where α ij = ((v i v j ) (v i v j )) 1, β ij = ((v i v J ) (v i v J )) 1, and γ ij = ((v i v j ) (v J v j )/l j ) 2. The partial derivative of η with respect to the x component of vertex v k, denoted η v kx, is calculated by summing the partial derivatives of the appropriate terms from 1 Addition and subtraction on indices should be understood to wrap around appropriately, so that v N+1 is equivalent to v 1.

19 15 Equation (4.2): α ij v kx = ((v i v j ) (v i v j )) 2 2(v i v j ) x if k = i, ((v i v j ) (v i v j )) 2 2(v i v j ) x if k = j, 0 otherwise. (4.3) β ij = α ij. (4.4) v kx v kx γ ij v kx = 2l 2 j ((v i v j ) (v J v j )) 3 (v J v j ) y if k = i, 2l 2 j ((v i v j ) (v J v j )) 3 (v i v J ) y if k = j, 2l 2 j ((v i v j ) (v J v j )) 3 (v i v j ) y if k = J, 0 otherwise. (4.5) In Equations , the terms of the form t x represent the x component of t. The partial derivatives of η with respect to y are similiar to those with respect to x with a few minor changes. The partial derivative α ij v ky the t x terms are changed to t y. The partial derivative γ ij v ky the t y terms changed to t x. is the same as α ij v kx is the negative of γ ij v kx except with Because many of the terms in the partial derivative calculation are zero, we can simplify the calculation of the derivative to η v ka = = N i=1 N j=1 j i, j (i 1) N j=1 j k, j (k 1) η ij v ka η kj v ka + N i=1 i k, i (k+1) η ik v ka + N i=1 i k, i (k 1) η i,k 1 v ka, (4.6) where a = x or y, depending on which partial derivative is being computed. This energy gradient is used in the following algorithm. 4.2 The Algorithm We use an iterative algorithm to generate an interpolation sequence between two input polygons, A and B, described by the following pseudo-code:

20 16 1. Establish compatibility and correspondence: The user, or some heuristic, indicates the desired correspondence between A and B and renumbers vertices accordingly. If one of the polygons contains fewer vertices than the other, then additional vertices are inserted by splitting edges. 2. While A and B are above a difference threshold: (a) Compute the energy for A and B. (b) Use the direction heuristic to determine a direction, D, that would move the higher energy polygon, H, toward the lower energy one, L. (c) Optional: Project D to enforce edge-length or other constraints. (d) If D would move H to a higher energy configuration: i. Project D so that it is perpendicular to the energy gradient and bias towards the downward energy gradient if necessary (see Section 4.4). (Attempt to honor any constraints if they are in use.) (e) If D is null: i. Set D to the direction of the downward energy gradient at H. (Attempt to honor any constraints if they are in use.) (f) Move H in the direction D. 3. Output the path taken by A to the common configuration and the reverse of the path taken by B. At each iteration of the while loop, the algorithm attempts to move the higher energy polygon, H, closer to the lower energy polygon, L, by using the direction heuristic to compute D. Projecting the direction D in step (2.d.i) and biasing it towards the downward energy gradient when necessary(see Section 4.4) ensures that the new polygon does not have a higher energy value than the previous polygon, H. This guarantees that the new polygon will be free from self-intersections. The condition in step (2.e)

21 17 could occur when the direction D is the same as the upward energy gradient at H. 2 When this occurs, the algorithm moves H downhill using the negative energy gradient, which we know is always possible from [6]. The algorithm terminates when the difference between the two polygons A and B is below a preset threshold. We found that measuring the difference in the polygons using the joint angle parameterization, as shown in Figure 4, avoids convergence problems that appeared when we used the vertex position parameterization. The joint angle parameterization for a polygon A is the set of edge lengths, {e 1,..., e N }, and the angles between each edge of the polygon and the x-axis T (A) = {θ 1,..., θ N 1 }. This is easily calculated when needed. Testing the closeness of polygons A and B becomes T (B) T (A) < β (4.7) where β can be determined from [6] or set conservatively. We decided to preset the threshold to be The difference between the two polygon s angle vectors must be carefully calculated to avoid any problems due to angle ambiguity. The algorithm is guaranteed to converge assuming that the direction heuristic used in step (2.b) to compute D moves polygon H closer to polygon L according to some metric of distance. We can informally prove this convergence by considering the two basic types of moves that are used to create a new polygon, an approach move or a descent move. An approach move is one that moves the polygons A and B closer to one another while a descent move steps in the direction of the negative energy gradient. Although the descent moves may undo some of the progress made by the approach moves, this is acceptable because the worst case situation would find the convex configurations for the polygons and interpolate between them. However, the approach moves cannot undo the progress made by the descent moves since the algorithm does not allow new polygons to have a higher energy value than their predecessor. An infinite number of descent moves would not occur in this algorithm since each step is 2 Recall that because the gradient of the nonlinear energy function varies over configuration space this situation will occur occasionally.

22 18 decreasing the energy toward a minimal energy polygon, which is the convex shape, and no moves increase energy. Similarly, an infinite number of approach moves at a non-negligable step size should not be possible provided the direction heuristic is valid since each approach move brings the input polygons closer to one another. Lastly, an infinite number of approach and descent moves undoing each other s progress cannot occur because approach moves cannot undo the progress of descent moves. In addition to guaranteeing that the step directions exist and lead to convergence, one must also deal with issues such as avoiding step sizes that converge toward zero. We refer the reader to Section 5.4 of [6] where we present a rigorous proof that the descent steps do converge in bounded time. We also suggest [10] for a discussion of the conditions under which descent methods generally converge, and to [4] or [19] for a general introduction to relevant numerical methods. For our current implementation we have found it sufficient to use a fixed step size that has been selected conservatively by the user, provided that it is less than the upper bound in [6]. The step size is dependent on the scale of the input polygons, so it varies between examples. For instance, the jagged teeth example in Figure 8 has a difference between the minimum and maximum vertex positions of 30 in the x direction and 33 in the y direction. The fixed step size used for this example is We have also implemented a line search method for determining the step size adaptively, but we found that using this for every iteration tended to decrease the quality of the animation, particularly when the direction D is more heavily biased by the downward energy gradient. In this case, the animation was not as pleasing because the polygons became more convex than necessary to compute the path. Also, we found that increasing this step size too much caused the case in step (2.d.i) when D needs to be biased by the energy gradient to occur more often, slowing the running time of the program. This could be due to a quickly changing energy gradient. However, a further exploration into using the line search only if D has not been changed after step (2.c) could potentially increase the speed of the program.

23 19 Figure 5: The top row demonstrates how using the vertex-position metric alone will, as expected, generate a sequence with self-intersections. The bottom row illustrates how the collision avoidance machinery alters the vertex motions to avoid self intersection. Computation time for this example was less than two seconds total. 4.3 Direction Heuristics The user is given control over the character of the animation by supplying a direction heuristic. This heuristic can be quite simple and still produce nice results because the energy function provides the collision avoidance component of the algorithm, enabling generation of an intersection-free interpolation sequence. There are a few conditions that the direction heuristic should satisfy to ensure convergence of the algorithm. A valid heuristic is one that generates a direction D that moves the initial configuration A closer to the target configuration B according to some distance metric on the space of polygon configurations. Additionally, this direction heuristic must cause the polygons to converge in a finite number of steps when used in the algorithm. The direction computed by the heuristic should also be free from extraneous components to ensure that the energy projection does not cancel the useful portion of the direction, resulting in a non-zero vector that prevents the algorithm from converging. One way to choose a direction heuristic satisfying these conditions is to define a distance metric on the space of polygon configurations and define the heuristic to be the gradient of that metric. Alternatively, if the direction heuristic were to contain extraneous components that were not part of a distance metric s gradient, then the condition in step (2.e) should instead test that D is not orthogonal to that

24 20 gradient. As described in Chapter 1, each polygon configuration is represented by a vector of length 2N. The most obvious direction heurstic is moving the vertices on a straight line to their target position, giving the simple heuristic D = B A. (4.8) This heuristic is actually the gradient of B A 2, which satisfies the conditions listed above. Using this heuristic alone would often produce a sequence containing selfintersecting polygons, as illustrated in the top row of Figure 5. By combining this simple heuristic with our energy-based collision avoidance algorithm, it can be used to create an interpolation sequence free from self-interections. In Chapter 5, we show many results created using this simple direction heuristic, the linear interpolation of vertex positions, that when combined with our collision avoidance algorithm produces pleasing results. To illustrate the ability of the direction heuristic to control the look of the interpolation sequence, we created a simple example with two direction heuristics, shown in Figure 6. For the second direction heuritic, we use the same polygon parameterization that we used in [6] where the polygon is represented in terms of the edge lengths, {e 1,..., e N }, and the angles between each edge of the polygon and the x-axis {θ 1,..., θ N 1 }, called joint angles, as illustrated in Figure 4. The direction heuristic we use with this parameterization is similar to Equation (4.8) except this it is now linearly interpolating the joint angles instead of the vertex positions. Interpolating angles can be tricky, so we ensure that the direction is computed in a consistent manner by always using the smaller change in angle. 4.4 Energy Projection The algorithm forces the newly created polygon to have an equal- or lowerenergy value than the current higher energy polygon H, guaranteeing that the generated

25 21 Figure 6: These images show interpolation between a box with an arm-like protrusion and a rotated version of the box with the arm bent. These simple examples demonstrate how the direction metric and constraints can affect the computed sequence. The first row shows the result computed using a vertex position metric. The second row shows the result for the vertex position metric after six distance constraints have been added. The bottom row uses a metric based on joint angles with no constraints. For each row, the edge lengths are held constant and less than 2.2 seconds of computation are required. interpolation path is free from self-intersections. The direction created by the heuristic in step (2.d.i) is projected only if that direction would create a new polygon with a higher energy value than H. The algorithm checks this condition with the equation D G 0 (4.9) where G is the normalized gradient of the repulsive energy function evaluated at H and calculated using Equation (4.6). When the direction D fails this test, the direction is projected to be perpendicular to G by D := ( I G G T) D (4.10) where I is the identity matrix. However, this new direction is not guaranteed to create a new polygon that has equal- or lower-energy than H even if the condition in Equation (4.9) is satisfied because the gradient of the energy function is not constant. When

26 22 (x, y ) 6 6 e 6 (x, y ) 4 4 e 5 (x, y ) 7 7 (x, y ) 8 8 e 7 d 2 d 1 e 8 (x, y ) 1 1 e 1 e 3 e 4 e 2 (x, y ) 3 3 (x, y ) 2 2 (x, y ) 5 5 Figure 7: This image illustrates two distance constraints {d 1, d 2 } between vertices not sharing an edge. Additionally, the edges, {e 1,..., e 8 }, could also be added to the list of constraints. this situation arises, we bias the direction D in the negative gradient direction by subtracting γg from the direction where γ is a small positive number. This amount varies based on how quickly the gradient changes, with quicker changes requiring a larger gradient contribution. We found that setting γ = and increasing by until the condition in Equation 4.9 is true to be sufficient. This ensures that the new polygon has an appropriate energy value to guarantee convergence of the algorithm. 4.5 Constraints The interpolation sequence can also be controlled by the user through specifying a set of constraints that should be satisfied by each polygon throughout the animation. The types of constraints that can be added include maintaining constant edge lengths, changing edge lengths monotonically, and adding distance constraints between vertices not sharing an edge, as illustrated in Figure 7. These constraints could be included in the direction heuristic, but the collision avoidance algorithm would then violate them needlessly when performing the energy projection described in Section 4.4. To avoid this, we combine the user constraint projections with the energy projection step and attempt to satisfy them simultaneously. We can always satisfy

27 23 the constraints in the special case where the edge lengths remain constant or change monotonically. The energy function used by our algorithm is from the unfolding theory, so we can guarantee that these edge constraints will not interfere with avoiding collisions. However, user constraints could be added in such a way that the algorithm could not satisfy them and avoid self-intersections simultaneously. In this case, the algorithm would satisfy the energy constraint, which is needed for convergence, and satisfy the user constraints as much as possible in a least-squares sense. This ensures that the algorithm will not fail due to invalid user constraints. We assume that each constraint applies to an individual polygon, P, is differentiable, and can be expressed in the form Ω (P ) = 0. (4.11) For example, we could constrain the edge lengths of a polygon to be constant by requiring that v i v i+1 2 li 2 = 0 i [1... N], (4.12) where v i and l i are the vertex positions and edge lengths of P, respectively. If there are M constraints and N vertices, let J be the M 2N matrix whose rows are the gradient vectors for each of the constraints. If the input polygons honor the constraints, then in step (2.c) we can project the direction D to satisfy them by first solving for l in the equation J J T l = J D. (4.13) The new direction is calculated by D := D J T l. (4.14) In general, error in the constraints can accumulate after taking finite steps in the projected direction since nonlinear constraints are still violated by small amounts due to the step size. This accumulated error could cause problems if ignored, so a constraint stabilization method is used. Let e be the error vector of length M containing each of

28 24 the constraints evaluated at the higher-energy polygon H. Error accumulation can be prevented by replacing Equation (4.13) with J J T l = J D + α e, (4.15) where α is a small constant. (For example, see [5] for a discussion of constraint stabilization and how to choose a suitable value for α.) Step (2.d) of the algorithm tests the current direction to ensure that it would not create a new polygon with a higher energy than H by using Equation (4.9). If this test fails, the direction is adjusted. In general, G will not be orthogonal to all of the constraints, stored in the rows of J. Using Equation (4.10) to modify the direction could undo the work done by the projection in Equation (4.15). This can be avoided by defining a new matrix, K, which is created by adding the gradient G as an extra row to the matrix J. Because there is a new row in the matrix that corresponds to the energy, an energy contribution factor γ/α is added to the end of the error vector e, creating the vector f. The adjusted direction is calculated in step (2.d.i) by first solving for l in K K T l = K D + α f (4.16) and substituting the result into D := D K T l. (4.17) The value for γ is a small positive number, found by iteratively increasing γ until the direction produces a new polygon with equal or lesser energy than H. This process can be slow when the gradient changes quickly, so our algorithm implements a method where the γ value from the previous iteration is used as a starting point for a few iterations of the algorithm before being slowly decreased back to zero. We found that using γ for five iterations, decreasing it by the same amount as the increment, (see Section 4.4), and repeating until γ = 0.0 works well. This greatly increases the speed of the algorithm while not decreasing the quality of the resulting animation.

29 25 The conjugate gradient method is used to solve for l efficiently in Equations (4.15) and (4.16). When solving these equations, the matrices J J T and K K T may be under-constrained, over-constrained or both. In an over-constrained system, the constraints cannot all be satisfied. In this case, the conjugate gradient method will satisfy the constraints equally in a least-squares sense, still producing an answer. The energy constraint is given greater importance in the solution by increasing the value of γ, which is done iteratively until this constraint is satisfied. This is preformed when the energy projected direction still produces a result that does not satisfy Equation (4.9), described above in Section 4.4. Similarly, we give the user the ability to weight the distance constraints by importance. However, they are still satisfied in such a way that the energy constraint is the most important. A simple example, computed with and without additional distance constraints, is illustrated in Figure 6. When edge lengths are constrained to remain constant, the system in Equation (4.16) will never be over-constrained because we know that expansive motions of polygons with constant edge lengths will always exist from [9]. We can always generate an interpolation between two polygons with equal edge lengths while keeping the edge lengths constant. In the case where the edge lengths are different between polygons, we can constrain them to change monotonically over the course of the animation. This is achieved by only including the corresponding constraint row of J or K if omitting that row would result in an edge getting further from its target length, rather than closer to it. This type of linear programming approach could be used to include other types of semi-algebraic constraints not described here Correcting Constant Edge Lengths In the special case of constraining the edge lengths to remain constant, error in the edge lengths can accumulate over the course of the animation due to the finite steps taken by the algorithm and the floating point precision of the machine. If ignored, this could result in a drift from the original edge lengths, which results in the frames of

30 26 the animation violating the constant edge-length constraints as time progresses. To correct this, we perform a reprojection step on the polygon when the accumulated length error is above a small threshold. This is achieved by computing the J matrix, whose rows are the gradient vectors for each of the constraints, and the vector of squared length errors, e l = l 2 c l 2 0 where l c is a vector of the current constraint lengths and l 0 is a vector of the original constraint lengths. We weight the squared length errors based on their original lengths by defining L to be a diagonal matrix with the reciprocal of the original constraint lengths, 1/(l 0 ) i, on the diagonal. Then the error direction is calculated by first solving for l in the equation J J T l = e l L (4.18) using the conjugate gradient method, as discussed in the section above. The result l is then used to calculate the error direction by D e := J T l. (4.19) This error direction is used in an iterative process to modify the polygon so that the accumulated error is decreased below a preset threshold. We found that setting the threshold to to be sufficiently small to keep the error from accumulating. By reprojecting the polygon when the lengths have drifted from their original values, we are able to minimize the effects of floating point roundoff problems and satisfy the constraints within a small error threshold.

31 27 Chapter 5 Results and Discussion We have implemented our algorithm and used it to create the examples shown in this paper and presented at [17]. The video available online [1] contains animations corresponding to these examples. Information about the running times and the methods used to create the examples can be found in their respective figure captions. A summary of the examples with the number of vertices, constraints used, and running times is also given in Table 2. The running times for our C++ implementation were measured in CPU seconds on a 3.06 GHz Pentium IV computer with 1 GB of memory. The rows of images in Figure 6 illustrate the use of different direction heuristics. As can be seen in the top and bottom rows, direction heuristics based on the Cartesian coordinates of the vertices and on joint angle coordinates produce very different results. The animation shown in the top row distorts the box as it is rotated, which may be undesirable. The middle row shows how this motion can be modified by adding additional distance constraints, which preserves the shape of the box as it is rotated. In Figure 10, distance constraints were added to maintain the shape of the six arms and outside box and also to keep the inside box rigid throughout the motion. Figure 12 illustrates that distance constraints can be added to drastically change an animation sequence. Using the vertex position direction heuristic alone, as illustrated in the top row, produces an animation that expands unnecessarily. Adding distance

32 28 Figure 8: This example interpolates between two configurations of interlocked teeth. The top row shows the result computed with the edge lengths constrained to change monotonically and required 7.5 minutes of computation. The bottom row shows the result computed with unconstrained edge lengths and required 2.7 minutes of computation. constraints creates a more rigid motion, as shown in the middle and bottom rows of the figure. The middle row may be compared to results shown by Gotsman and Surazhsky in [13] and [24]. A feature of the method is that it preserves symmetries. In Figures 1 and 10, the input polygons are symmetric about a central horizontal axis. It is evident that the animation preserves this symmetry throughout the interpolation. Similarly, the input for Figure 14 is symmetric about a central vertical axis. Figures 6 and 8 both demonstrate animations where the input polygons mirror each other and the method creates temporally symmetric sequences. Our method also enables the user to choose the behavior of the edge lengths during the animation. The animation sequence in Figure 1 shows the result of running our method with the constraint that edge lengths are held constant. The examples in Figures 8 and 9 illustrate the difference between constraining the edge lengths to change monotonically (top row) or allowing them to change freely (bottom row). For some examples, constraining the edge lengths generated pleasing results. However, in the leaf-plane example the constraint causes an ugly pinch to form in the leaf-stem/planetail. Because a good sequence depends on the subjective criteria applied by the user, we feel the flexibility afforded by our approach is highly desirable. Other examples using

33 29 Figure 9: As an experiment, we relaxed the requirement that steps never increase energy (see text). The top row was computed with constrained edge lengths, requiring 6.7 minutes of computation. The bottom row has unconstrained edge lengths, requiring 2.9 minutes of computation. The leaf and plane outlines were provided by Marc Alexa. Note that these input objects are not symmetric. unconstrained edge lengths are pictured in Figures 13 and 14. In Figure 15, we decided based on aesthetic considerations to morph from T to E with constrained edge lengths while the other letters animations are created with unconstrained edge lengths. Figure 11 shows interpolation between different levels of the two-dimensional Hilbert curve. The large bottom edge connecting the two sides of the curve is changing monotonically throughout the animation, while the rest of the edges are constrained to be constant length. To maximize visibility, configurations are uniformly scaled to give a constant image size. We can also relax the requirement that steps never increase the energy. As an experiment, we allowed the leaf-plane examples in Figure 9 to take steps that increase the energy up to a threshold. This modified algorithm still avoids self-intersections, but it could potentially fail to converge. One possible problem with our method is that it only uses local information, the energy function gradient, to avoid collisions. As a result, we cannot guarantee that the path generated is optimal in any sense. We can only guarantee that we can find an intersection-free path between two input polygons. In practice, however the algorithm appears to do a good job of finding paths that do not detour needlessly.

34 30 Figure Edge Length Constraints Distance Constraints # vertices Time 1 Constant None min 5, top Constant None sec 5, bottom Constant None sec 6, top Constant None sec 6, middle Constant sec 6, bottom Constant None sec 8, top Monotonic None min 8, bottom None None min 9, top Monotonic None min 9, bottom None None min 10 Monotonic min 11, top Monotonic None min 11, bottom Monotonic None hr 12, top Monotonic None sec 12, middle Monotonic min 12, bottom Monotonic min 13 None None sec 14 None None sec 15, T to E Monotonic None sec 15, H to N None None sec 15, E to D None None sec Table 2: Running times for the C++ implementation of our refolding algorithm, measured in CPU seconds on a 3.02 GHz Pentium IV with 1 GB of memory. All examples use the vertex position direction heuristic except for the bottom row of Figure 6. We have experimented with applying relatively expensive optimization procedures to, for example, shorten a computed path. So far, we have not observed that this effort produces any significant improvements. These experiments suggest that the computed paths might be at least locally optimal, at all times greedily minimizing the deviation from the greedy heuristic. The collision avoidance technique described here provides a method for generating intersection-free interpolation sequences between arbitrary, non-intersecting, planar polygons. We can guarantee that such a path can be found when used with any suitable distance metric. The examples illustrate that our method can handle a variety of polygons and produce pleasing results. The user-supplied direction heuristic along with the constraints provides the user with a powerful control mechanism for determining how the interpolation should appear, while still being assured against instersection.

35 31 Figure 10: In addition to constrained edge lengths, this example has eighteen distance constraints (drawn light gray in the first and last frames). The total computation time was 2.4 minutes. Figure 11: Examples of interpolating with constrained edge lengths between levels of the Hilbert curve. The frames in the top row have 260 vertices and computation time was 2.8 minutes. The bottom row frames have 1026 vertices and required 1.7 hours of computation. In addition to shape morphing applications in computer graphics, the facility to include length and other constraints may allow our work to be useful for other problems, such as finding efficient, direct motion paths for planar robotic arm manipulators. There are several directions for improving our results further. Although our C++ implementation is robust and fast, using an adaptive time step, such as a modified line search method as discussed in Section 4.2, might improve running times. Other areas for future work include exploring interesting direction heuristics and adding other types of constraints to the system. It would also be interesting to explore the extent to which our techniques can be applied to 3D polygons and tree skeletons. In these contexts, interpolation sequences may be required to intersect, but even a solution when the two objects are similar could be useful, such as for character animation.

Refolding Planar Polygons

Refolding Planar Polygons Refolding Planar Polygons Hayley N. Iben James F. O Brien Erik D. Demaine University of California, Berkeley Massachusetts Institute of Technology Abstract This paper describes a guaranteed technique for

More information

Refolding Planar Polygons

Refolding Planar Polygons Discrete & Computational Geometry manuscript No. (will be inserted by the editor) Refolding Planar Polygons Hayley N. Iben 1, James F. O Brien 2, Erik D. Demaine 3 1 University of California, Berkeley

More information

Refolding Planar Polygons

Refolding Planar Polygons Refolding Planar Polygons Hayley N. Iben James F. O Brien Erik D. Demaine iben@eecs.berkeley.edu job@eecs.berkeley.edu edemaine@mit.edu University of California, Berkeley Massachusetts Institute of Technology

More information

Refolding Planar Polygons

Refolding Planar Polygons Discrete Comput Geom (2009) 41: 444 460 DOI 10.1007/s00454-009-9145-7 Refolding Planar Polygons Hayley N. Iben James F. O Brien Erik D. Demaine Received: 27 September 2006 / Revised: 17 November 2007 /

More information

CS 763 F16. Moving objects in space with obstacles/constraints.

CS 763 F16. Moving objects in space with obstacles/constraints. Moving objects in space with obstacles/constraints. Objects = robots, vehicles, jointed linkages (robot arm), tools (e.g. on automated assembly line), foldable/bendable objects. Objects need not be physical

More information

Research Article Polygon Morphing and Its Application in Orebody Modeling

Research Article Polygon Morphing and Its Application in Orebody Modeling Mathematical Problems in Engineering Volume 212, Article ID 732365, 9 pages doi:1.1155/212/732365 Research Article Polygon Morphing and Its Application in Orebody Modeling Hacer İlhan and Haşmet Gürçay

More information

Intrinsic Morphing of Compatible Triangulations. VITALY SURAZHSKY CRAIG GOTSMAN

Intrinsic Morphing of Compatible Triangulations. VITALY SURAZHSKY CRAIG GOTSMAN International Journal of Shape Modeling Vol. 9, No. 2 (2003) 191 201 c World Scientific Publishing Company Intrinsic Morphing of Compatible Triangulations VITALY SURAZHSKY vitus@cs.technion.ac.il CRAIG

More information

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions.

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions. Path and Trajectory specification Robots are built to accomplish complex and difficult tasks that require highly non-linear motions. Specifying the desired motion to achieve a specified goal is often a

More information

Chapter 15 Introduction to Linear Programming

Chapter 15 Introduction to Linear Programming Chapter 15 Introduction to Linear Programming An Introduction to Optimization Spring, 2015 Wei-Ta Chu 1 Brief History of Linear Programming The goal of linear programming is to determine the values of

More information

CSCI 4620/8626. Computer Graphics Clipping Algorithms (Chapter 8-5 )

CSCI 4620/8626. Computer Graphics Clipping Algorithms (Chapter 8-5 ) CSCI 4620/8626 Computer Graphics Clipping Algorithms (Chapter 8-5 ) Last update: 2016-03-15 Clipping Algorithms A clipping algorithm is any procedure that eliminates those portions of a picture outside

More information

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into 2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel

More information

Practical Linear Algebra: A Geometry Toolbox

Practical Linear Algebra: A Geometry Toolbox Practical Linear Algebra: A Geometry Toolbox Third edition Chapter 18: Putting Lines Together: Polylines and Polygons Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book

More information

Parameterization. Michael S. Floater. November 10, 2011

Parameterization. Michael S. Floater. November 10, 2011 Parameterization Michael S. Floater November 10, 2011 Triangular meshes are often used to represent surfaces, at least initially, one reason being that meshes are relatively easy to generate from point

More information

Lecture notes on the simplex method September We will present an algorithm to solve linear programs of the form. maximize.

Lecture notes on the simplex method September We will present an algorithm to solve linear programs of the form. maximize. Cornell University, Fall 2017 CS 6820: Algorithms Lecture notes on the simplex method September 2017 1 The Simplex Method We will present an algorithm to solve linear programs of the form maximize subject

More information

An Energy-Driven Approach to Linkage Unfolding

An Energy-Driven Approach to Linkage Unfolding An Energy-Driven Approach to Linkage Unfolding Jason H. Cantarella Erik D. Demaine Hayley N. Iben James F. O Brien Abstract We present a new algorithm for unfolding planar polygonal linkages without self-intersection

More information

Lecture 3: Art Gallery Problems and Polygon Triangulation

Lecture 3: Art Gallery Problems and Polygon Triangulation EECS 396/496: Computational Geometry Fall 2017 Lecture 3: Art Gallery Problems and Polygon Triangulation Lecturer: Huck Bennett In this lecture, we study the problem of guarding an art gallery (specified

More information

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a coordinate system and then the measuring of the point with

More information

Discrete Optimization. Lecture Notes 2

Discrete Optimization. Lecture Notes 2 Discrete Optimization. Lecture Notes 2 Disjunctive Constraints Defining variables and formulating linear constraints can be straightforward or more sophisticated, depending on the problem structure. The

More information

Planes Intersecting Cones: Static Hypertext Version

Planes Intersecting Cones: Static Hypertext Version Page 1 of 12 Planes Intersecting Cones: Static Hypertext Version On this page, we develop some of the details of the plane-slicing-cone picture discussed in the introduction. The relationship between the

More information

Visibility Graph. How does a Mobile Robot get from A to B?

Visibility Graph. How does a Mobile Robot get from A to B? Robot Path Planning Things to Consider: Spatial reasoning/understanding: robots can have many dimensions in space, obstacles can be complicated Global Planning: Do we know the environment apriori? Online

More information

Lecture 2 September 3

Lecture 2 September 3 EE 381V: Large Scale Optimization Fall 2012 Lecture 2 September 3 Lecturer: Caramanis & Sanghavi Scribe: Hongbo Si, Qiaoyang Ye 2.1 Overview of the last Lecture The focus of the last lecture was to give

More information

Technische Universität München Zentrum Mathematik

Technische Universität München Zentrum Mathematik Technische Universität München Zentrum Mathematik Prof. Dr. Dr. Jürgen Richter-Gebert, Bernhard Werner Projective Geometry SS 208 https://www-m0.ma.tum.de/bin/view/lehre/ss8/pgss8/webhome Solutions for

More information

Morphing Planar Graph Drawings

Morphing Planar Graph Drawings Morphing Planar Graph Drawings Giuseppe Di Battista Università degli Studi Roma Tre The 12th International Conference and Workshops on Algorithms and Computation WALCOM 2018 Basic definitions Graph drawing

More information

Model Based Perspective Inversion

Model Based Perspective Inversion Model Based Perspective Inversion A. D. Worrall, K. D. Baker & G. D. Sullivan Intelligent Systems Group, Department of Computer Science, University of Reading, RG6 2AX, UK. Anthony.Worrall@reading.ac.uk

More information

05 - Surfaces. Acknowledgements: Olga Sorkine-Hornung. CSCI-GA Geometric Modeling - Daniele Panozzo

05 - Surfaces. Acknowledgements: Olga Sorkine-Hornung. CSCI-GA Geometric Modeling - Daniele Panozzo 05 - Surfaces Acknowledgements: Olga Sorkine-Hornung Reminder Curves Turning Number Theorem Continuous world Discrete world k: Curvature is scale dependent is scale-independent Discrete Curvature Integrated

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) Path Planning for Point Robots Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/mpa Class Objectives Motion planning framework Classic motion planning approaches 2 3 Configuration Space:

More information

Singularity Analysis of an Extensible Kinematic Architecture: Assur Class N, Order N 1

Singularity Analysis of an Extensible Kinematic Architecture: Assur Class N, Order N 1 David H. Myszka e-mail: dmyszka@udayton.edu Andrew P. Murray e-mail: murray@notes.udayton.edu University of Dayton, Dayton, OH 45469 James P. Schmiedeler The Ohio State University, Columbus, OH 43210 e-mail:

More information

Stereo imaging ideal geometry

Stereo imaging ideal geometry Stereo imaging ideal geometry (X,Y,Z) Z f (x L,y L ) f (x R,y R ) Optical axes are parallel Optical axes separated by baseline, b. Line connecting lens centers is perpendicular to the optical axis, and

More information

Shape Modeling and Geometry Processing

Shape Modeling and Geometry Processing 252-0538-00L, Spring 2018 Shape Modeling and Geometry Processing Discrete Differential Geometry Differential Geometry Motivation Formalize geometric properties of shapes Roi Poranne # 2 Differential Geometry

More information

The Art Gallery Problem: An Overview and Extension to Chromatic Coloring and Mobile Guards

The Art Gallery Problem: An Overview and Extension to Chromatic Coloring and Mobile Guards The Art Gallery Problem: An Overview and Extension to Chromatic Coloring and Mobile Guards Nicole Chesnokov May 16, 2018 Contents 1 Introduction 2 2 The Art Gallery Problem 3 2.1 Proof..................................

More information

(Refer Slide Time: 00:02:02)

(Refer Slide Time: 00:02:02) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 20 Clipping: Lines and Polygons Hello and welcome everybody to the lecture

More information

Inverse Kinematics. Given a desired position (p) & orientation (R) of the end-effector

Inverse Kinematics. Given a desired position (p) & orientation (R) of the end-effector Inverse Kinematics Given a desired position (p) & orientation (R) of the end-effector q ( q, q, q ) 1 2 n Find the joint variables which can bring the robot the desired configuration z y x 1 The Inverse

More information

Tutte s Theorem: How to draw a graph

Tutte s Theorem: How to draw a graph Spectral Graph Theory Lecture 15 Tutte s Theorem: How to draw a graph Daniel A. Spielman October 22, 2018 15.1 Overview We prove Tutte s theorem [Tut63], which shows how to use spring embeddings to obtain

More information

Tracking Minimum Distances between Curved Objects with Parametric Surfaces in Real Time

Tracking Minimum Distances between Curved Objects with Parametric Surfaces in Real Time Tracking Minimum Distances between Curved Objects with Parametric Surfaces in Real Time Zhihua Zou, Jing Xiao Department of Computer Science University of North Carolina Charlotte zzou28@yahoo.com, xiao@uncc.edu

More information

Parallel Computation of Spherical Parameterizations for Mesh Analysis. Th. Athanasiadis and I. Fudos University of Ioannina, Greece

Parallel Computation of Spherical Parameterizations for Mesh Analysis. Th. Athanasiadis and I. Fudos University of Ioannina, Greece Parallel Computation of Spherical Parameterizations for Mesh Analysis Th. Athanasiadis and I. Fudos, Greece Introduction Mesh parameterization is a powerful geometry processing tool Applications Remeshing

More information

Some Open Problems in Graph Theory and Computational Geometry

Some Open Problems in Graph Theory and Computational Geometry Some Open Problems in Graph Theory and Computational Geometry David Eppstein Univ. of California, Irvine Dept. of Information and Computer Science ICS 269, January 25, 2002 Two Models of Algorithms Research

More information

A NON-TRIGONOMETRIC, PSEUDO AREA PRESERVING, POLYLINE SMOOTHING ALGORITHM

A NON-TRIGONOMETRIC, PSEUDO AREA PRESERVING, POLYLINE SMOOTHING ALGORITHM A NON-TRIGONOMETRIC, PSEUDO AREA PRESERVING, POLYLINE SMOOTHING ALGORITHM Wayne Brown and Leemon Baird Department of Computer Science The United States Air Force Academy 2354 Fairchild Dr., Suite 6G- USAF

More information

Iterative Algorithms I: Elementary Iterative Methods and the Conjugate Gradient Algorithms

Iterative Algorithms I: Elementary Iterative Methods and the Conjugate Gradient Algorithms Iterative Algorithms I: Elementary Iterative Methods and the Conjugate Gradient Algorithms By:- Nitin Kamra Indian Institute of Technology, Delhi Advisor:- Prof. Ulrich Reude 1. Introduction to Linear

More information

Parameterization of triangular meshes

Parameterization of triangular meshes Parameterization of triangular meshes Michael S. Floater November 10, 2009 Triangular meshes are often used to represent surfaces, at least initially, one reason being that meshes are relatively easy to

More information

Which n-venn diagrams can be drawn with convex k-gons?

Which n-venn diagrams can be drawn with convex k-gons? Which n-venn diagrams can be drawn with convex k-gons? Jeremy Carroll Frank Ruskey Mark Weston Abstract We establish a new lower bound for the number of sides required for the component curves of simple

More information

Chapter 3 Numerical Methods

Chapter 3 Numerical Methods Chapter 3 Numerical Methods Part 1 3.1 Linearization and Optimization of Functions of Vectors 1 Problem Notation 2 Outline 3.1.1 Linearization 3.1.2 Optimization of Objective Functions 3.1.3 Constrained

More information

13. Learning Ballistic Movementsof a Robot Arm 212

13. Learning Ballistic Movementsof a Robot Arm 212 13. Learning Ballistic Movementsof a Robot Arm 212 13. LEARNING BALLISTIC MOVEMENTS OF A ROBOT ARM 13.1 Problem and Model Approach After a sufficiently long training phase, the network described in the

More information

Parallel and perspective projections such as used in representing 3d images.

Parallel and perspective projections such as used in representing 3d images. Chapter 5 Rotations and projections In this chapter we discuss Rotations Parallel and perspective projections such as used in representing 3d images. Using coordinates and matrices, parallel projections

More information

Reachability on a region bounded by two attached squares

Reachability on a region bounded by two attached squares Reachability on a region bounded by two attached squares Ali Mohades mohades@cic.aku.ac.ir AmirKabir University of Tech., Math. and Computer Sc. Dept. Mohammadreza Razzazi razzazi@ce.aku.ac.ir AmirKabir

More information

Configuration Space of a Robot

Configuration Space of a Robot Robot Path Planning Overview: 1. Visibility Graphs 2. Voronoi Graphs 3. Potential Fields 4. Sampling-Based Planners PRM: Probabilistic Roadmap Methods RRTs: Rapidly-exploring Random Trees Configuration

More information

CS452/552; EE465/505. Geometry Transformations

CS452/552; EE465/505. Geometry Transformations CS452/552; EE465/505 Geometry Transformations 1-26-15 Outline! Geometry: scalars, points & vectors! Transformations Read: Angel, Chapter 4 (study cube.html/cube.js example) Appendix B: Spaces (vector,

More information

THE preceding chapters were all devoted to the analysis of images and signals which

THE preceding chapters were all devoted to the analysis of images and signals which Chapter 5 Segmentation of Color, Texture, and Orientation Images THE preceding chapters were all devoted to the analysis of images and signals which take values in IR. It is often necessary, however, to

More information

Programming, numerics and optimization

Programming, numerics and optimization Programming, numerics and optimization Lecture C-4: Constrained optimization Łukasz Jankowski ljank@ippt.pan.pl Institute of Fundamental Technological Research Room 4.32, Phone +22.8261281 ext. 428 June

More information

Elastic Bands: Connecting Path Planning and Control

Elastic Bands: Connecting Path Planning and Control Elastic Bands: Connecting Path Planning and Control Sean Quinlan and Oussama Khatib Robotics Laboratory Computer Science Department Stanford University Abstract Elastic bands are proposed as the basis

More information

Mathematical Programming and Research Methods (Part II)

Mathematical Programming and Research Methods (Part II) Mathematical Programming and Research Methods (Part II) 4. Convexity and Optimization Massimiliano Pontil (based on previous lecture by Andreas Argyriou) 1 Today s Plan Convex sets and functions Types

More information

Computer Graphics. The Two-Dimensional Viewing. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics. The Two-Dimensional Viewing. Somsak Walairacht, Computer Engineering, KMITL Computer Graphics Chapter 6 The Two-Dimensional Viewing Somsak Walairacht, Computer Engineering, KMITL Outline The Two-Dimensional Viewing Pipeline The Clipping Window Normalization and Viewport Transformations

More information

5. GENERALIZED INVERSE SOLUTIONS

5. GENERALIZED INVERSE SOLUTIONS 5. GENERALIZED INVERSE SOLUTIONS The Geometry of Generalized Inverse Solutions The generalized inverse solution to the control allocation problem involves constructing a matrix which satisfies the equation

More information

RASTERIZING POLYGONS IN IMAGE SPACE

RASTERIZING POLYGONS IN IMAGE SPACE On-Line Computer Graphics Notes RASTERIZING POLYGONS IN IMAGE SPACE Kenneth I. Joy Visualization and Graphics Research Group Department of Computer Science University of California, Davis A fundamental

More information

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

Geometric Computations for Simulation

Geometric Computations for Simulation 1 Geometric Computations for Simulation David E. Johnson I. INTRODUCTION A static virtual world would be boring and unlikely to draw in a user enough to create a sense of immersion. Simulation allows things

More information

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

Technische Universität München Zentrum Mathematik

Technische Universität München Zentrum Mathematik Question 1. Incidence matrix with gaps Technische Universität München Zentrum Mathematik Prof. Dr. Dr. Jürgen Richter-Gebert, Bernhard Werner Projective Geometry SS 2016 www-m10.ma.tum.de/projektivegeometriess16

More information

Figure 1: A positive crossing

Figure 1: A positive crossing Notes on Link Universality. Rich Schwartz: In his 1991 paper, Ramsey Theorems for Knots, Links, and Spatial Graphs, Seiya Negami proved a beautiful theorem about linearly embedded complete graphs. These

More information

The Helly Number of the Prime-coordinate Point Set

The Helly Number of the Prime-coordinate Point Set The Helly Number of the Prime-coordinate Point Set By KEVIN BARRETT SUMMERS SENIOR THESIS Submitted in partial satisfaction of the requirements for Highest Honors for the degree of BACHELOR OF SCIENCE

More information

CS231A Course Notes 4: Stereo Systems and Structure from Motion

CS231A Course Notes 4: Stereo Systems and Structure from Motion CS231A Course Notes 4: Stereo Systems and Structure from Motion Kenji Hata and Silvio Savarese 1 Introduction In the previous notes, we covered how adding additional viewpoints of a scene can greatly enhance

More information

Straight Line motion with rigid sets

Straight Line motion with rigid sets Straight ine motion with rigid sets arxiv:40.4743v [math.mg] 9 Jan 04 Robert Connelly and uis Montejano January 7, 08 Abstract If one is given a rigid triangle in the plane or space, we show that the only

More information

Shape Blending Using the Star-Skeleton Representation

Shape Blending Using the Star-Skeleton Representation Shape Blending Using the Star-Skeleton Representation Michal Shapira Ari Rappoport Institute of Computer Science, The Hebrew University of Jerusalem Jerusalem 91904, Israel. arir@cs.huji.ac.il Abstract:

More information

Singularity Loci of Planar Parallel Manipulators with Revolute Joints

Singularity Loci of Planar Parallel Manipulators with Revolute Joints Singularity Loci of Planar Parallel Manipulators with Revolute Joints ILIAN A. BONEV AND CLÉMENT M. GOSSELIN Département de Génie Mécanique Université Laval Québec, Québec, Canada, G1K 7P4 Tel: (418) 656-3474,

More information

CURVILINEAR MESH GENERATION IN 3D

CURVILINEAR MESH GENERATION IN 3D CURVILINEAR MESH GENERATION IN 3D Saikat Dey, Robert M. O'Bara 2 and Mark S. Shephard 2 SFA Inc. / Naval Research Laboratory, Largo, MD., U.S.A., dey@cosmic.nrl.navy.mil 2 Scientific Computation Research

More information

A TESSELLATION FOR ALGEBRAIC SURFACES IN CP 3

A TESSELLATION FOR ALGEBRAIC SURFACES IN CP 3 A TESSELLATION FOR ALGEBRAIC SURFACES IN CP 3 ANDREW J. HANSON AND JI-PING SHA In this paper we present a systematic and explicit algorithm for tessellating the algebraic surfaces (real 4-manifolds) F

More information

Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps

Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps Oliver Cardwell, Ramakrishnan Mukundan Department of Computer Science and Software Engineering University of Canterbury

More information

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation and the type of an object. Even simple scaling turns a

More information

Convexization in Markov Chain Monte Carlo

Convexization in Markov Chain Monte Carlo in Markov Chain Monte Carlo 1 IBM T. J. Watson Yorktown Heights, NY 2 Department of Aerospace Engineering Technion, Israel August 23, 2011 Problem Statement MCMC processes in general are governed by non

More information

Modern Methods of Data Analysis - WS 07/08

Modern Methods of Data Analysis - WS 07/08 Modern Methods of Data Analysis Lecture XV (04.02.08) Contents: Function Minimization (see E. Lohrmann & V. Blobel) Optimization Problem Set of n independent variables Sometimes in addition some constraints

More information

Robotic Motion Planning: Review C-Space and Start Potential Functions

Robotic Motion Planning: Review C-Space and Start Potential Functions Robotic Motion Planning: Review C-Space and Start Potential Functions Robotics Institute 16-735 http://www.cs.cmu.edu/~motionplanning Howie Choset http://www.cs.cmu.edu/~choset What if the robot is not

More information

Theoretical Computer Science

Theoretical Computer Science Theoretical Computer Science 408 (2008) 129 142 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs Drawing colored graphs on colored points

More information

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs Advanced Operations Research Techniques IE316 Quiz 1 Review Dr. Ted Ralphs IE316 Quiz 1 Review 1 Reading for The Quiz Material covered in detail in lecture. 1.1, 1.4, 2.1-2.6, 3.1-3.3, 3.5 Background material

More information

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES YINGYING REN Abstract. In this paper, the applications of homogeneous coordinates are discussed to obtain an efficient model

More information

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial Lecture VI: Constraints and Controllers Parts Based on Erin Catto s Box2D Tutorial Motion Constraints In practice, no rigid body is free to move around on its own. Movement is constrained: wheels on a

More information

Assignment 4: Mesh Parametrization

Assignment 4: Mesh Parametrization CSCI-GA.3033-018 - Geometric Modeling Assignment 4: Mesh Parametrization In this exercise you will Familiarize yourself with vector field design on surfaces. Create scalar fields whose gradients align

More information

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics I. Guoying Zhao 1 / 52

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics I. Guoying Zhao 1 / 52 Computer Graphics Three-Dimensional Graphics I Guoying Zhao 1 / 52 Geometry Guoying Zhao 2 / 52 Objectives Introduce the elements of geometry Scalars Vectors Points Develop mathematical operations among

More information

Edge and local feature detection - 2. Importance of edge detection in computer vision

Edge and local feature detection - 2. Importance of edge detection in computer vision Edge and local feature detection Gradient based edge detection Edge detection by function fitting Second derivative edge detectors Edge linking and the construction of the chain graph Edge and local feature

More information

Chapter 18. Geometric Operations

Chapter 18. Geometric Operations Chapter 18 Geometric Operations To this point, the image processing operations have computed the gray value (digital count) of the output image pixel based on the gray values of one or more input pixels;

More information

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation Chapter 7 Introduction to Matrices This chapter introduces the theory and application of matrices. It is divided into two main sections. Section 7.1 discusses some of the basic properties and operations

More information

E0005E - Industrial Image Analysis

E0005E - Industrial Image Analysis E0005E - Industrial Image Analysis The Hough Transform Matthew Thurley slides by Johan Carlson 1 This Lecture The Hough transform Detection of lines Detection of other shapes (the generalized Hough transform)

More information

Fast marching methods

Fast marching methods 1 Fast marching methods Lecture 3 Alexander & Michael Bronstein tosca.cs.technion.ac.il/book Numerical geometry of non-rigid shapes Stanford University, Winter 2009 Metric discretization 2 Approach I:

More information

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves David L. Finn Over the next few days, we will be looking at extensions of Bezier

More information

Collision Detection CS434. Daniel G. Aliaga Department of Computer Science Purdue University

Collision Detection CS434. Daniel G. Aliaga Department of Computer Science Purdue University Collision Detection CS434 Daniel G. Aliaga Department of Computer Science Purdue University Some Applications Animations/games Robotic planning Haptics Some collision detection approaches Minkowski Sum

More information

2D/3D Geometric Transformations and Scene Graphs

2D/3D Geometric Transformations and Scene Graphs 2D/3D Geometric Transformations and Scene Graphs Week 4 Acknowledgement: The course slides are adapted from the slides prepared by Steve Marschner of Cornell University 1 A little quick math background

More information

1 Trajectories. Class Notes, Trajectory Planning, COMS4733. Figure 1: Robot control system.

1 Trajectories. Class Notes, Trajectory Planning, COMS4733. Figure 1: Robot control system. Class Notes, Trajectory Planning, COMS4733 Figure 1: Robot control system. 1 Trajectories Trajectories are characterized by a path which is a space curve of the end effector. We can parameterize this curve

More information

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9.

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9. II.4 Surface Simplification 37 II.4 Surface Simplification In applications it is often necessary to simplify the data or its representation. One reason is measurement noise, which we would like to eliminate,

More information

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects Object Representation Affine Transforms Polygonal Representation of Objects Although perceivable the simplest form of representation they can also be the most problematic. To represent an object polygonally,

More information

Determination of 6D-workspaces of Gough-type parallel. manipulator and comparison between different geometries. J-P. Merlet

Determination of 6D-workspaces of Gough-type parallel. manipulator and comparison between different geometries. J-P. Merlet Determination of 6D-workspaces of Gough-type parallel manipulator and comparison between different geometries J-P. Merlet INRIA Sophia-Antipolis, France Abstract: We consider in this paper a Gough-type

More information

MODULE - 7. Subject: Computer Science. Module: Other 2D Transformations. Module No: CS/CGV/7

MODULE - 7. Subject: Computer Science. Module: Other 2D Transformations. Module No: CS/CGV/7 MODULE - 7 e-pg Pathshala Subject: Computer Science Paper: Computer Graphics and Visualization Module: Other 2D Transformations Module No: CS/CGV/7 Quadrant e-text Objectives: To get introduced to the

More information

UNIT 2 2D TRANSFORMATIONS

UNIT 2 2D TRANSFORMATIONS UNIT 2 2D TRANSFORMATIONS Introduction With the procedures for displaying output primitives and their attributes, we can create variety of pictures and graphs. In many applications, there is also a need

More information

Kinematics of Closed Chains

Kinematics of Closed Chains Chapter 7 Kinematics of Closed Chains Any kinematic chain that contains one or more loops is called a closed chain. Several examples of closed chains were encountered in Chapter 2, from the planar four-bar

More information

Rubber bands. Chapter Rubber band representation

Rubber bands. Chapter Rubber band representation Chapter 1 Rubber bands In the previous chapter, we already used the idea of looking at the graph geometrically, by placing its nodes on the line and replacing the edges by rubber bands. Since, however,

More information

CS612 - Algorithms in Bioinformatics

CS612 - Algorithms in Bioinformatics Fall 2017 Structural Manipulation November 22, 2017 Rapid Structural Analysis Methods Emergence of large structural databases which do not allow manual (visual) analysis and require efficient 3-D search

More information

UNIT 2 GRAPHIC PRIMITIVES

UNIT 2 GRAPHIC PRIMITIVES UNIT 2 GRAPHIC PRIMITIVES Structure Page Nos. 2.1 Introduction 46 2.2 Objectives 46 2.3 Points and Lines 46 2.4 Line Generation Algorithms 48 2.4.1 DDA Algorithm 49 2.4.2 Bresenhams Line Generation Algorithm

More information

Motion Planning. Howie CHoset

Motion Planning. Howie CHoset Motion Planning Howie CHoset Questions Where are we? Where do we go? Which is more important? Encoders Encoders Incremental Photodetector Encoder disk LED Photoemitter Encoders - Incremental Encoders -

More information

Supplementary Materials for

Supplementary Materials for advances.sciencemag.org/cgi/content/full/4/1/eaao7005/dc1 Supplementary Materials for Computational discovery of extremal microstructure families The PDF file includes: Desai Chen, Mélina Skouras, Bo Zhu,

More information

Generalized barycentric coordinates

Generalized barycentric coordinates Generalized barycentric coordinates Michael S. Floater August 20, 2012 In this lecture, we review the definitions and properties of barycentric coordinates on triangles, and study generalizations to convex,

More information

2D Object Definition (1/3)

2D Object Definition (1/3) 2D Object Definition (1/3) Lines and Polylines Lines drawn between ordered points to create more complex forms called polylines Same first and last point make closed polyline or polygon Can intersect itself

More information

EXTREME POINTS AND AFFINE EQUIVALENCE

EXTREME POINTS AND AFFINE EQUIVALENCE EXTREME POINTS AND AFFINE EQUIVALENCE The purpose of this note is to use the notions of extreme points and affine transformations which are studied in the file affine-convex.pdf to prove that certain standard

More information

On a nested refinement of anisotropic tetrahedral grids under Hessian metrics

On a nested refinement of anisotropic tetrahedral grids under Hessian metrics On a nested refinement of anisotropic tetrahedral grids under Hessian metrics Shangyou Zhang Abstract Anisotropic grids, having drastically different grid sizes in different directions, are efficient and

More information