constrained spline curves

75
Constrained Spline Cur ves Reporter: Jun Chen Dec 7, 2006

Upload: misha

Post on 05-Jan-2016

67 views

Category:

Documents


0 download

DESCRIPTION

Constrained Spline Curves. Reporter: Jun Chen Dec 7, 2006. References. A constrained guided G 1 continuous spline curve (CAD,2003) D.S. Meek, B.H. Ong, D.J. Walton - PowerPoint PPT Presentation

TRANSCRIPT

  • Constrained Spline Curves

    Reporter: Jun ChenDec 7, 2006

  • ReferencesA constrained guided G1 continuous spline curve (CAD,2003) D.S. Meek, B.H. Ong, D.J. Walton

    A smooth, obstacle-avoiding curve (Computers & Graphics,2006) Z. Li, D.S. Meek, D.J. Walton

  • A constrained guided G1 continuous spline curveD.S. Meek, B.H. Ong, D.J. WaltonCAD, 2003, 35: p591-599

  • About the authorsDereck S. Meek Desmond J. Walton

  • About the authorsThey are Professors of Computer Science at the University of Manitoba. They obtained a PhD from the University of Manitoba.

    Recent Research Publications(1989--1999): Arc splines, Clothoids, Cubic B-splines and cubic Bezier curves, Spirals, Surfaces and 3D modelling, Visualization, etc. (CAD, CAGD, Computers & Graphics, Journal of Computational and Applied Mathematics)

  • About the authorsBoon-Hua Ong is an associate professor in the School of Mathematical Sciences, Universiti Sains Malaysia, Malaysia. She received a PhD from the University of California at Berkeley, USA in Mathematics.Her current research interest is in Approximation theory, CAGD.

  • Work of this paper

  • Work of this paper

  • BackgroundDesigning a shape to be cut from a flat sheet of material.Designing a smooth robot path that avoids obstacles.

  • Previous workNowacki H, Liu D, Lu X. Fairing Bezier curves with constraints. Comput Aid Geomet Des 1990;7:4355.Goodman TNT, Ong BH, Unsworth K. Constrained interpolation using rational cubic splines. In: Farin G, editor. NURBS for curve and surface design. Philadelphia: SIAM; 1991. p. 5974.Duan Q, Xu G, Liu A, Wang X, Cheng F. Constrained interpolation using rational cubic spline curves with linear denominators. Korean J Comput Appl Math 1999;6:20315.Zhang C, Cheng F. Constrained shape-preserving parametric curve interpolation with minimum curvature. Preprint.

  • AdvantageThe boundary consists of straight line segments and circular arcs. The curve here is quadratic, most other results use cubics. The curve here is guided by control points rather than by the more commonly used interpolation points.

  • Outline1.2.

  • Def. of G1A curve is G1 continuous if it is continuous and has a continuous unit tangent vector (equivalently, the tangent direction is continuous).

  • Rational quadratic Bezier curves

  • Rational quadratic Bezier curvesResult: The points on a curve (1) are a weighted average of the control points B0, B1, and B2. With the restrictions on t and w in Eq. (1), all of the weights are positive, so all points B(t, w) are strictly inside the control triangle B0B1B2.

  • Lemma 1Lemma 1. If P is strictly inside the Bezier control triangle B0B1B2, then there is a unique curve (1) that passes through P. If P is not inside the control triangle, then there is no curve (1) that passes through P.

  • Lemma 1 stands for the scalar cross product of two dimensional vectors.Def:It is positive when the counterclockwise angle from a to b is greater than 0.Property:

  • Lemma 1r

  • Lemma 1The direction of this vector is constant with respect to w, so the locus of points B(t, w) with fixed t and increasing w is a straight line from B(t, 0) to B1.

  • Lemma 1

  • Lemma 2 Lemma 2. For the distinct points S0 and S1 , if conditions below are satisfied, then there is a unique curve (1) tangent to the line segment S0 S1. Otherwise, there is no curve (1) that is tangent to line segment S0 S1.

  • Lemma 2 Set the infinite line L through the points S0 and S1 . L mustpass through the control triangle for a tangent to be possible,cannot cut B0B2,cannot pass through B1 .

  • Lemma 2B(t, w) must be on L, and are collinear:

    Curve (1) is tangent to L , and are co-line:

  • Lemma 2It shows that this quadratic has a double root.

  • Lemma 2B1 cannot be on line L.

  • Lemma 2

    Remark:

  • Lemma 2The point of tangency P= B(t, w), may not be in the line segment S0 S1, so a final check is needed:

  • Lemma 3Lemma 3. S0 and S1 are distinct endpoints of an arc, the sweep angle of the arc is non-zero, if conditions below are satisfied, then there exist one or more curves (1) that are tangent to the arc from S0 to S1. Otherwise, no curve (1) exists that is tangent to the arc from S0to S1 .

  • Lemma 3By analogy with Lemma 2:

    has a double root in t.

    Remark:The condition for the equation to have a double root is showed in the Appendix A. A check is also made to see if the point is in the arc, and there may be several curves (1) tangent to the arc.

  • Solution of the problemThe solution is based on a quadratic B-spline with uniform knots. each Bezier segment can be considered separately because overall G1 continuity is guaranteed from the Bezier control polyline.

  • Solution of the problem

  • Case 1Boundary does not enter the control triangle B0B1B2.

  • Case 2Boundary enters the control triangle B0B1B2 by crossing line segment B0B2.

  • Special caseTo force the curve to be tangent to a straight line segment of the boundary at a given point.To run the curve along a straight line segment of the boundary.To force a cusp at a boundary point.

  • Result

  • Control polyline crossing the boundary

  • Result

  • Future workQuadratic Cubic

    G1 G2

  • Constrained interpolation with rational cubicsD.S. Meek, B.H. Ong, D.J. WaltonCAGD, 2003, 20: p253-275

  • Rational cubic

  • Result

  • A smooth, obstacle-avoiding curveZ. Li, D.S. Meek, D.J. WaltonComputers & Graphics,2006,30,581-587

  • About the authors ()1994.9-1998.6 (),.1998.9-2003.6 ,,,. 2003.6-2003.12 Manitoba ,, D.S. Meek D. J. alton.2004.12-2006.12 ,,.

    :,,,.

  • Work of this paperIt is shown that the spline curve can designed to be as close as desired to the guiding polyline and thus a spline curve that avoids the obstacles can always be found.

  • Work of this paper

  • Previous work and comparisonConstrained interpolation with rational cubics. (References [5])

    Comparison: The method proposed here solves a similar problem with simpler curves (polynomials instead of rationals) that are easier to find (quadratic instead of quartic equations).

  • Previous work and comparisonReferences [6], [7], [8].(Useing clothoids to smooth polyline paths.)

    Comparison: A disadvantage of clothoids is that the clothoid is a transcendental curve and thus cannot easily be incorporated into standard graphics packages as a NURBS curve.

  • Previous work and comparisonReferences [1], [11], [12]

    Comparison: Ref. [1] uses a divide-and-conquer iteration, Ref. [11], [12] requires linear programming, both of them require much more computation than the method proposed here.

  • Curves and Surfaces for CAGD: A Practical Guide (5e)Gerald FarinMorgan Kaufmann, 2001

  • Def. of G2A curve is G1 continuous if it is continuous and has a continuous unit tangent vector (equivalently, the tangent direction is continuous). A curve is G2 continuous if it is G1 continuous and its curvature is continuous.

  • G2 cubic spline curve (chapter 11)diB3i+1B3i+2b3i+4di+1B3i+3

  • G2 cubic spline curve (chapter 11)In interactive design, it is important to observe that b3i-1 b3i+1 is tangent to the curve. Instead of prescribing numbers and --not very intuitive--a designer may thus specify tangents to the curve, and the parameter can be computed.b3i+1b3i-1b3i

  • G2 cubic spline curve (chapter 11)In interactive design, it is important to observe that b3i-1 b3i+1 is tangent to the curve. Instead of prescribing numbers and --not very intuitive--a designer may thus specify tangents to the curve, and the parameter can be computed.b3i+1b3i-1b3i

  • Interpolating G2 cubic spline curveGiven data points xi , specify a sequence pairs and . Setting b3i=xi, we haveb3i = xidi+1di+2dib3i+1b3i-1

  • Interpolating G2 cubic spline curveGiven data points xi , specify a sequence pairs and . Setting b3i=xi, we have

  • Outline1.2.

  • C-shaped polylineC-shapedS-shaped

  • C-shaped polylineA polyline joining vertices B0, B1, . . . , Bnis said to be C-shaped if the following cross products are all positive or all negative:

    B0, B1, B2, B3 is said to be self-intersecting if and only if

    Remark: We will point out its advantage later (convex hull).

  • C-shaped polylineSetting: C-shaped:

    Not self-intersect:

  • C-shaped polyline

  • C-shaped polyline>0>0not self-intersect

  • Lemma 1If P is in the triangle with vertices {b3i-1(ua), di, b3i+1(ua)}, a value up
  • Lemma 2If the convex hull of {B3i (ua), B3i+1(ua), B3i+2(ua), B3i+3(ua)} includes a point P, a value up
  • The algorithmStep 1: Partition the given guiding polyline into C-shaped sections.

    Remark: The guiding polyline is still allowed to intersect itself over more than 4 vertices.

  • The algorithmStep 2: Choose a u-value in each C-shaped section such that the resulting spline avoids the relevant obstacles.

  • The algorithmStep 2: Choose a u-value in each C-shaped section such that the resulting spline avoids the relevant obstacles.

    The curvature of spline at B0 (u)= d0 anddn (u)=B3n is zero since both of the triples{B0,B1,B2} and{B3n-2,B3n-1,B3n}are collinear.

  • The algorithmStep 2.1: The treatment of obstacles.

  • The algorithmStep 2.1: The treatment of obstacles.

  • The algorithmStep 2.2: The choice of the parameter u.For each C-shaped section, (1) an initial value of u such as u = 0.8 can be chosen, (2) reducing u as described in Case 1, (3) reducing u further as described in Case 2, (4) the final u is the value after all the reductions.

    Ref.[10]

  • Example 1Partitioned into three C-shaped sections.

    Initial curves when u=0.8.

  • Example 2Initial curves when u=0.8.

    Partitioned into four C-shaped sections.

  • Future workFarin G2 cubic spline curve

  • Thank you!