1 / 35

Alina Shaikhet (CS, Technion)

Offset of curves. Alina Shaikhet (CS, Technion). Computer Aided Geometric Design (236716). Plan. General introduction. Planar Curve Offset based on Circle Approximation. Offsets of 2D Profiles. Computing Offset of B-Spline curves. Introduction.

mooreb
Download Presentation

Alina Shaikhet (CS, Technion)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Offset of curves. Alina Shaikhet (CS, Technion) Computer Aided Geometric Design (236716) Center for Graphics and Geometric Computing, Technion

  2. Plan • General introduction. • Planar Curve Offset based on Circle Approximation. • Offsets of 2D Profiles. • Computing Offset of B-Spline curves. Center for Graphics and Geometric Computing, Technion

  3. Introduction • The offsetting is one of the most difficult geometric operations to implement. The exact offset curves and surfaces have very high algebraic degree compared with the original curves and surfaces. • For a few simple curve types, the offset will take the same form as the curve; that is, the offset of a line is a line, and that of a circle is the circle. But this is not generally true: the offset of a polynomial is not a polynomial, and that of a spline is not a spline. Most offsets have to be approximated, preferably from the same space of functions used for the curves. Center for Graphics and Geometric Computing, Technion

  4. Introduction • Given a planar regular parametric curve , the offset curve (with respect to a fixed radius r) is defined by where is the unit normal of . • Due to the square root function in the denominator of N(t), the exact offset curves are not rational in general. • For “Pythagorean hodograph curves” holds for some polynomial . Their offset curves are rational. Center for Graphics and Geometric Computing, Technion

  5. Introduction Previous offset computation methods for parametric curves approximated either: • The original curve C(t) by line segments and circular arcs, or • The offset curve Cr(t) by low degree polynomial curves. The offsets are also the line segments and circular arcs. Disadvantage: Many line segments and circular arcs are required to approximate a given planar curve. Center for Graphics and Geometric Computing, Technion

  6. Introduction • Let denote the radius of curvature of C(t), • - the unit tangent vector to curve Cr at t0. • - the unit normal to C at t0. • if points away from the center of curvature or if . • does not exist if and points toward the center of curvature. (cusp point) • if and points toward the center of curvature. (loop) • So, if points toward the center of curvature, then the tangent of the offset will reverse the direction at Center for Graphics and Geometric Computing, Technion

  7. Planar Curve Offset based on Circle Approximation. In-Known Lee, Myung-Soo Kim and Gershon Elber.

  8. Introduction Presented algorithm: • Given: a planar parametric curve C(t) and an offset radius r. • Goal: approximate planar offset curve Cr(t) within an arbitrary tolerance . • Approximate the circle of radius r by piecewise quadratic Bezier curve segments Q(s) with the tolerance . • Convolve the given curve C(t) with the quadratic Bezier curve segments: Center for Graphics and Geometric Computing, Technion

  9. Introduction Offset approximation error: The maximal value of , where is an approximation of . • Curve refinement is made in the parameter values which gives the maximum error. Center for Graphics and Geometric Computing, Technion

  10. Circle approximation with quadratic Bezier curve segments. The quadratic Bezier curve with three control points is given by: for . Assume: The approximation error of the curve from the unit circle: for . Center for Graphics and Geometric Computing, Technion

  11. Circle approximation with quadratic Bezier curve segments. Instead of using which has a square root term, we may use for As the approximation converges to the exact offset, we have: Center for Graphics and Geometric Computing, Technion

  12. Circle approximation with quadratic Bezier curve segments. As a 4-degree polynomial , has 5 extreme values at most. (assume D>1). Center for Graphics and Geometric Computing, Technion

  13. Circle approximation with quadratic Bezier curve segments. Method 1: tangent to the circle at both ends. Let , be the quadratic Bezier curve which is tangent to the circle at the end-points of the curve. Then: • two adjacent curves meet with G1-continuity. • the middle control point , thus . • , and while the maximum error occurs at with magnitude: Center for Graphics and Geometric Computing, Technion

  14. Circle approximation with quadratic Bezier curve segments. Error functions for five methods. always lies in the exterior of the circle. Center for Graphics and Geometric Computing, Technion

  15. Circle approximation with quadratic Bezier curve segments. Method 2: uniform scaling of the Method 1. Error function takes only non-negative values. Scale all the three control points of simultaneously by a certain magnitude. That is, the curve Is defined by: Error function: Center for Graphics and Geometric Computing, Technion

  16. Circle approximation with quadratic Bezier curve segments. , thus the two functions have extreme values at the same parameter values of s. Since , we have . We minimize the approximation error by taking so that or equivalently, Center for Graphics and Geometric Computing, Technion

  17. Circle approximation with quadratic Bezier curve segments. Thus the values of is given by And the approximation error is given by the value: Center for Graphics and Geometric Computing, Technion

  18. Circle approximation with quadratic Bezier curve segments. Method 3: interpolating three circle points. Let pass through the mid-point of the circular arc; that is, we make: • Two adjacent curves meet with G0-continuity. • The resulting curve always lies in the interior of the circle. • From follows • Maximum errors are at with negative magnitude Center for Graphics and Geometric Computing, Technion

  19. Circle approximation with quadratic Bezier curve segments. Method 4: interpolating with equi-oscillating error. We want to make the error function has the same magnitude of maximum and minimum values: Thus, the corresponding value of is Maximum errors are obtained at Center for Graphics and Geometric Computing, Technion

  20. Circle approximation with quadratic Bezier curve segments. Method 5: uniform scaling of the Method 3. The curve of Method 3 is contained in the interior of the unit circle. This means that the error function takes only non-positive values. Let the curve be defined similarly to the Method 2: Where (note that ) Center for Graphics and Geometric Computing, Technion

  21. Approximating planar offset curves. Definition: Given two planar curves, their convolution curve is defined as the set of all vector sums generated by all pairs of curve points which have the same curve normal direction. Center for Graphics and Geometric Computing, Technion

  22. Approximating planar offset curves. A quadratic curve has a linear one-to-one hodograph curve Assume that the mapping is well defined. If and have the same direction, we have: and the parameter is uniquely determined by: Center for Graphics and Geometric Computing, Technion

  23. Approximating planar offset curves. • The approximated offset curve is defined by: • For a polynomial curve of degree d, the approximated offset curve is a planar rational curve of degree 3d-2. • For a rational polynomial curve of degree d, the approximated offset curve is a rational curve of degree 5d-4. Center for Graphics and Geometric Computing, Technion

  24. Offsets of 2D Profiles Wayne Tiller and Eric G. Hanson

  25. Introduction Let be a collection of curves such that the end point of Ci coincides with the start point of Ci+1. P is called a profile. No pairwise or self-intersections among the are allowed. Any of the curves is assumed to have a well-defined tangent vector at each point, and they are in nonuniform rational B-Spline representation. Center for Graphics and Geometric Computing, Technion

  26. Offsetting a curve. Algorithm. • Denote by A1 the set of original control points of C, and by K1 the corresponding knot vector. Set i=1. • Offset each “leg” of Ai (as line segments) a distance r. • Intersect the offset polygon legs in a pairwise manner. This yields a set, Bi of new control points. The , defined by Bi and Ki , is the i-th approximation to the offset of C. • Check the deviation of from the true offset. • If the deviation is greater than or equal to , make refinement to get Ai+1,Ki+1. Set i=i+1 and go to step 2. Else – stop. Center for Graphics and Geometric Computing, Technion

  27. Offsetting a curve. • Lines and circles are offset precisely at i=1. • Finding of cusps and loops during the process. Center for Graphics and Geometric Computing, Technion

  28. Loop removal. (loop caused by ) • Find a good approximation, Q’, to the self-intersection point of the loop by finding the intersections of the control polygon with itself. • Use Newton’s method to improve the solution. This method also yields the two parameter values t1 and t2 (t1<t2) corresponding to the self-intersection point Q. • Split the offset at t1 and t2 (using Boehm’s algorithm). Throw out the middle section (between t1 and t2). Q becomes a control point with multiplicity equal to the order of the basis functions, and t1, t2 are knots, each with multiplicity equal to order-1. Center for Graphics and Geometric Computing, Technion

  29. Offsetting a profile. Process the curves of P in a pairwise fashion: (C1, C2), (C2, C3),…, (Cn-1, Cn). At each step, offset the two curves, process any loops and cusps, and join the offsets. Center for Graphics and Geometric Computing, Technion

  30. Computing offsets of B-Spline curves. Sabine Coquillart

  31. Offsetting a curve. Algorithm. • As in a previous technique, the offset of a curve is defined by the curve of the same type, i.e. with the same knot vector and the same order. So only the new control points have to be defined. • Each new control point is the offset of a control point of the original curve in the direction given by the normal at the closest point of the curve. • The offset factor is related to both the curvature and the distance between the control point and its closest point on the curve. Center for Graphics and Geometric Computing, Technion

  32. Offsetting a curve. Algorithm. • For each control point of C(t) define a control node - the closest point of the curve. • The new control point is defined by the offset of the control point in the direction of the normal at the associated control node. Center for Graphics and Geometric Computing, Technion

  33. Offsetting a curve. Algorithm. Center for Graphics and Geometric Computing, Technion

  34. Offsetting a curve. Algorithm. Curvature is redefined as an average of the curvature at the control node and the curvatures are computed at half the distance between the control node and each of its two neighbor control nodes. Center for Graphics and Geometric Computing, Technion

  35. Thank You! Center for Graphics and Geometric Computing, Technion

More Related