Offset of curves. Alina Shaikhet (CS, Technion)

Slides:



Advertisements
Similar presentations
Arc-length computation and arc-length parameterization
Advertisements

Lecture Notes #11 Curves and Surfaces II
Lecture 10 Curves and Surfaces I
Geometric Modeling Notes on Curve and Surface Continuity Parts of Mortenson, Farin, Angel, Hill and others.
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Dr. S.M. Malaek Assistant: M. Younesi
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 11: Curves Problems
Curve Offset Planar Curve Offset Based on Circle Approximation.
Rational Bezier Curves
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
Cubic Bezier and B-Spline Curves
Curves Mortenson Chapter 2-5 and Angel Chapter 9
Computer Graphics (Fall 2008) COMS 4160, Lectures 8,9: Curves Problems
1 Precise Voronoi Cell Extraction of Free-form Rational Planar Closed Curves Iddo Hanniel, Ramanathan Muthuganapathy, Gershon Elber Department of Computer.
Modelling: Curves Week 11, Wed Mar 23
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
CS Subdivision I: The Univariate Setting Peter Schröder.
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Solving Inequalities We can solve inequalities just like equations, with the following exception: Multiplication or division of an inequality by a negative.
Splines III – Bézier Curves
Solving Equations. Is a statement that two algebraic expressions are equal. EXAMPLES 3x – 5 = 7, x 2 – x – 6 = 0, and 4x = 4 To solve a equation in x.
Curve Modeling Bézier Curves
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
1 Preliminaries Precalculus Review I Precalculus Review II
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
Curve Modeling B-Spline Curves
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
(Spline, Bezier, B-Spline)
V. Space Curves Types of curves Explicit Implicit Parametric.
Self-intersection detection and elimination in freeform curves and surfaces Diana Pekerman Department of Mathematics, Technion – IIT, Haifa 32000, Israel;
Curves.
Vector Computer Graphic. Vector entities Line Circle, Ellipse, arc,… Curves: Spline, Bezier’s curve, … … Areas Solids Models.
Evolution-based least-squares fitting using Pythagorean hodograph spline curves Speaker: Ying.Liu November
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
1 Subdivision Termination Criteria in Subdivision Multivariate Solvers Iddo Hanniel, Gershon Elber CGGC, CS, Technion.
Linear Interpolation (for curve 01).  This chapter discusses straight lines and flat surfaces that are defined by points.  The application of these.
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
Artistic Surface Rendering Using Layout Of Text Tatiana Surazhsky Gershon Elber Technion, Israel Institute of Technology.
Ship Computer Aided Design MR 422. Geometry of Curves 1.Introduction 2.Mathematical Curve Definitions 3.Analytic Properties of Curves 4.Fairness of Curves.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Basic Theory (for curve 02). 1.3 Parametric Curves  The main aim of computer graphics is to display an arbitrary surface so that it looks real.  The.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
11/26/02(C) University of Wisconsin Last Time BSplines.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
(c) 2002 University of Wisconsin
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
Ship Computer Aided Design
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Introduction to Parametric Curve and Surface Modeling.
© University of Wisconsin, CS559 Spring 2004
CS5500 Computer Graphics May 11, 2006
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

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

Center for Graphics and Geometric Computing, Technion 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

Center for Graphics and Geometric Computing, Technion 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

Center for Graphics and Geometric Computing, Technion 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

Center for Graphics and Geometric Computing, Technion 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

Center for Graphics and Geometric Computing, Technion 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

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

Center for Graphics and Geometric Computing, Technion 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

Center for Graphics and Geometric Computing, Technion 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Center for Graphics and Geometric Computing, Technion 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

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

Center for Graphics and Geometric Computing, Technion 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

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

Center for Graphics and Geometric Computing, Technion 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

Computing offsets of B-Spline curves. Sabine Coquillart

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

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

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

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

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