Approximation of Circular Arcs by Parametric Polynomials

Similar documents
Approximation of Circular Arcs by Parametric Polynomial Curves

Bernstein polynomials of degree N are defined by

Curvature variation minimizing cubic Hermite interpolants

Interpolation and polynomial approximation Interpolation

Sample Exam 1 KEY NAME: 1. CS 557 Sample Exam 1 KEY. These are some sample problems taken from exams in previous years. roughly ten questions.

M2R IVR, October 12th Mathematical tools 1 - Session 2

Geometric Lagrange Interpolation by Planar Cubic Pythagorean-hodograph Curves

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

CGT 511. Curves. Curves. Curves. What is a curve? 2) A continuous map of a 1D space to an nd space

CSE 167: Lecture 11: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Introduction to Curves. Modelling. 3D Models. Points. Lines. Polygons Defined by a sequence of lines Defined by a list of ordered points

Hermite Interpolation with Euclidean Pythagorean Hodograph Curves

High order parametric polynomial approximation of conic sections

Pythagorean-hodograph curves

Curves, Surfaces and Segments, Patches

G-code and PH curves in CNC Manufacturing

Lecture 23: Hermite and Bezier Curves

1.1. The analytical denition. Denition. The Bernstein polynomials of degree n are dened analytically:

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama

On-Line Geometric Modeling Notes

On Parametric Polynomial Circle Approximation

Geometric Interpolation by Planar Cubic Polynomials

The Essentials of CAGD

MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs

Home Page. Title Page. Contents. Bezier Curves. Milind Sohoni sohoni. Page 1 of 27. Go Back. Full Screen. Close.

Introduction. Chapter Points, Vectors and Coordinate Systems

Bézier Curves and Splines

Lecture 20: Bezier Curves & Splines

Learning Objectives for Math 166

Planar interpolation with a pair of rational spirals T. N. T. Goodman 1 and D. S. Meek 2

EXPLICIT ERROR BOUND FOR QUADRATIC SPLINE APPROXIMATION OF CUBIC SPLINE

Motion design with Euler-Rodrigues frames of quintic Pythagorean-hodograph curves

Curves. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Taku Komura

Smooth Path Generation Based on Bézier Curves for Autonomous Vehicles

CONTROL POLYGONS FOR CUBIC CURVES

Cubic Splines; Bézier Curves

G 1 Hermite Interpolation by Minkowski Pythagorean Hodograph Cubics

An O(h 2n ) Hermite approximation for conic sections

Things you should have learned in Calculus II

Geometry and Motion, MA 134 Week 1

154 Chapter 9 Hints, Answers, and Solutions The particular trajectories are highlighted in the phase portraits below.

Visualizing Bezier s curves: some applications of Dynamic System Geogebra

MAT 300 Midterm Exam Summer 2017

Introduction to Computer Graphics (Lecture No 07) Ellipse and Other Curves

Curves - Foundation of Free-form Surfaces

Reading. w Foley, Section 11.2 Optional

Keyframing. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

2 The De Casteljau algorithm revisited

Geometric approximation of curves and singularities of secant maps Ghosh, Sunayana

Algebraic Curves. (Com S 477/577 Notes) Yan-Bin Jia. Oct 17, 2017

Interpolation and polynomial approximation Interpolation

Computing roots of polynomials by quadratic clipping

SIAM Conference on Applied Algebraic Geometry Daejeon, South Korea, Irina Kogan North Carolina State University. Supported in part by the

ON GEOMETRIC INTERPOLATION BY PLANAR PARAMETRIC POLYNOMIAL CURVES

Math 234. What you should know on day one. August 28, You should be able to use general principles like. x = cos t, y = sin t, 0 t π.

ELLIPTIC CURVES BJORN POONEN

Computer Graphics Keyframing and Interpola8on

Continuous Curvature Path Generation Based on Bézier Curves for Autonomous Vehicles

(Refer Slide Time: 2:08 min)

Lecture 11: Arclength and Line Integrals

Entrance Exam, Differential Equations April, (Solve exactly 6 out of the 8 problems) y + 2y + y cos(x 2 y) = 0, y(0) = 2, y (0) = 4.

MATH Final Review

ON INTERPOLATION BY PLANAR CUBIC G 2 PYTHAGOREAN-HODOGRAPH SPLINE CURVES

Dierential Geometry Curves and surfaces Local properties Geometric foundations (critical for visual modeling and computing) Quantitative analysis Algo

MATH 2433 Homework 1

Spiral spline interpolation to a planar spiral

MA3D9. Geometry of curves and surfaces. T (s) = κ(s)n(s),

Extrapolation Methods for Approximating Arc Length and Surface Area

Functions, Graphs, Equations and Inequalities

Nonlinear Means in Geometric Modeling

HOMEWORK 2 SOLUTIONS

MA 323 Geometric Modelling Course Notes: Day 11 Barycentric Coordinates and de Casteljau s algorithm

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

Novel polynomial Bernstein bases and Bézier curves based on a general notion of polynomial blossoming

1. Find the domain of the following functions. Write your answer using interval notation. (9 pts.)

A Variational Model for Data Fitting on Manifolds by Minimizing the Acceleration of a Bézier Curve

MAT300/500 Programming Project Spring 2019

MA 323 Geometric Modelling Course Notes: Day 20 Curvature and G 2 Bezier splines

Curve Fitting: Fertilizer, Fonts, and Ferraris

The Way of Analysis. Robert S. Strichartz. Jones and Bartlett Publishers. Mathematics Department Cornell University Ithaca, New York

13 Path Planning Cubic Path P 2 P 1. θ 2

LECTURE 15: COMPLETENESS AND CONVEXITY

g(t) = f(x 1 (t),..., x n (t)).

Lecture 4: Numerical solution of ordinary differential equations

Chapter 10: Conic Sections; Polar Coordinates; Parametric Equations

Curve Fitting. 1 Interpolation. 2 Composite Fitting. 1.1 Fitting f(x) 1.2 Hermite interpolation. 2.1 Parabolic and Cubic Splines

SOLUTIONS TO SECOND PRACTICE EXAM Math 21a, Spring 2003

Differential Geometry of Curves

The Mathematics of Maps Lecture 4. Dennis The The Mathematics of Maps Lecture 4 1/29

Math 153 Calculus III Notes

Optimal Polynomial Admissible Meshes on the Closure of C 1,1 Bounded Domains

cosh 2 x sinh 2 x = 1 sin 2 x = 1 2 cos 2 x = 1 2 dx = dt r 2 = x 2 + y 2 L =

VARIATIONAL INTERPOLATION OF SUBSETS

Hyperbolic Geometry on Geometric Surfaces

Exercises for Multivariable Differential Calculus XM521

Geometric meanings of the parameters on rational conic segments

Module 2: Reflecting on One s Problems

1 Roots of polynomials

Transcription:

Approximation of Circular Arcs by Parametric Polynomials Emil Žagar Lecture on Geometric Modelling at Charles University in Prague December 6th 2017 1 / 44

Outline Introduction Standard Reprezentations of Circular Arcs Naive Parametric Polynomial Approximation Bézier Curves Approximation of Circular Arcs by Bézier Curves 2 / 44

Introduction Basic question: what is a circle (circular arc)? A set of points in the plane at a fixed (constant) distance from a particular point (center). Planar curve which has a constant (nonzero) curvature. One of the conic section curves. A solution of the ordinary differential equation... y (y q) + (x p) = 0, p, q R. 3 / 44

We shall consider a cricular arc as a planar parametirc curve. Parameterization of a planar curve: a (smooth) map r of the closed interval I R to R 2 : r : I R 2, r 0, r(t) = (x(t), y(t)) T, x, y : I R. There are infinitely many parameterizations (just consider reparameterization; compositum of the original parameterization by smooth (bijective) map ρ : J R I ). 4 / 44

As simple as possible parameterizations are required in practice polynomial, rational,... Unfortunately: the whole circle can not be parameterized by parametric polynomials. Almost the whole circle can be represented as rational curve. Polynomial parameterizations are still quite popular in industry. So we need good parametric polynomial approximations of circular arcs. 5 / 44

Standard Reprezentations of Circular Arcs Consider unit circle centered at O(0, 0). Explicit representation: y(x) = ± 1 x 2, 1 x 1. Advantages: simple evaluation, simple plotting,... Disadvantage: not a single formula describing the whole object. 6 / 44

Implicit representation: x 2 + y 2 1 = 0. Advantages: simple formula for a whole object, easy check if the point is on the curve,... Disadvantage: complicated plotting. Parametric representation shares some nice properties of explicit and implicit representation. 7 / 44

Standard parametric representation of circular arc: x(ϕ) = cos ϕ, y(ϕ) = sin ϕ, ϕ [ α, α], α [0, π]. 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0.5 0 0.5 1 Figure: Parameterization of the unit circular arc given by the central angle 2 π/3. 8 / 44

Naive Parametric Polynomial Approximation Componentwise approximation. One possibility is right at hand: Taylor expansion around ϕ = 0): x(ϕ) p n (ϕ), y(ϕ) q n (ϕ), where p n (ϕ) = q n (ϕ) = n ( 1) k ϕ2k (2k)!, n ( 1) k ϕ 2k+1 (2k + 1)!. k=0 k=0 Disadvantage: a lot of terms required for larger angles (n 1). 9 / 44

Figure: Approximation of the circular arc given by the central angle 2 π/3. Taylor approximants: degree 2 (red), degree 3 (purple), degree 4 (black). 10 / 44

We consider the curve componentwise. Components of the circular arcs are connected, x 2 + y 2 1, e.g.,... We should use the approach where we consider that components are not independent. A usual aprroach: Bézier curves. 11 / 44

Bézier curves For a given sequence of planar points {P j } n j=0 define b(t) = n P j Bj n (t), t [0, 1], j=0 where B n j (t) := are Bernstein polynomials. ( ) n t j (1 t) n j, j = 0, 1,..., n, j The curve b obtained is so called planar Bézier curve. Points {P j } n j=0 are control points, and the polygon given by the control points is control polygon. 12 / 44

Figure: Bézier curve of degree 4 (red) given by control points (black) and control polygon (blue). 13 / 44

1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Figure: Basis Bernstein polynomials of degree 4 (B 4 0 red, B4 1 green, B 4 2 blue, B4 3 black and B4 4 pink). 14 / 44

Independently developed by P.E. Bézier 1 and P. de Casteljau 2. Extremely popular in computer era. Basic tool in CAGD(Computer Aided Geometric Design): animations, car industry, aircraft industry, modelling in general,... Can be generalized to surfaces and solids. 1 Pierre Étienne Bézier, 1910-1999, french engineer at Renault. 2 Paul de Faget de Casteljau, 1930-1999, french engineer at Citroën. 15 / 44

Important properties: The first and the last control points are interpolatory: b(0) = P 0, b(1) = P n. Tangent vectors at the first and at the last control point are b (0) = n(p 1 P 0 ), b (1) = n(p n P n 1 ). Convex hull property: the whole curve is in the convex hull of the control points. 16 / 44

If j-th control point is moved by the vector v, the curve is moved by B n j (t) v. Variation diminishing property: the number of the intersections of the curve by a line is bounded by the number of intersections of the same line by the control polygon. The curve is affine invariant (PostScript).... 17 / 44

Figure: ( ) The third control point of the Bézier curve is moved by 1 v =. 1 18 / 44

Figure: Variation diminishing property. 19 / 44

Figure: Anticlockwise rotation of the Bézier curve by 90 around the first control point. 20 / 44

Figure: Scaling of the Bézier curve by factor 2. 21 / 44

Approximation of Circular Arcs by Bézier Curves Consider polynomial approximant p n : [0, 1] R 2 of degree n of the circular arc in Bézier form. In contrast to Taylor approximation we can easily interpolate boundary points of the arc. Thus: p n (t) = n P j Bj n (t), j=0 kjer je P 0 = [cos ϕ, sin ϕ] T in P n = [cos ϕ, sin ϕ] T. 22 / 44

We use the property of the derivative at the boundary points: p (0) = d [sin ϕ, cos ϕ] T p (1) = d [ sin ϕ, cos ϕ] T. The free parameter d 0 is a shape parameter or geometric continuity of the first order parameter (the direction of the tangent is prescribed, but not the magnitude). Due to the symmetry d is the same for both tangents and also control points are symmetric. 23 / 44

P n d P n 1 P 1 d P 0 Figure: Control points of the Bézier approximant if geometric continuity at the boundary points is required. 24 / 44

The parameter d and control points (P 2,..., P n 2 ) can be used as shape parameters. Several possibilities: minimization of the deviation of the approximant from the circular arc, optimal curvature profile, approximation of the arc-length,... The minimization of the deviation will be considered here. 25 / 44

Distance Between Parametric Curves. Easy question: How to measure a distance between parametric curves? Not so easy as in functional case. Different parameterizations. One possibility: just measure distance between sets of points (Hausdorff distance). Let X and Y be given sets and d a metric on X Y : { } d H (X, Y ) = max sup inf d(x, y), sup inf d(x, y) x X y Y y Y x X 26 / 44

Figure: Hausdorff distance between X and Y (source: Wikipedia). Disadvantage: huge time complexity even in discrete case. 27 / 44

Consider two curves p : I R 2, q : I R 2 ; naive approach: Example Take p, q : [0, 1] R 2, where d(p, q) = max p(t) q(t) 2. t I p(t) = [t, t] T, q(t) = [1 t, 1 t] T, Then What is wrong here? max p(t) q(t) 2 = 2. t [0,1] 28 / 44

Parametric distance: p : I R 2, q : J R 2. d(p, q) = inf φ where φ : I J in a bijection. max p(t) (q φ) (t) 2, t I Obviously Hausdorff distance is smaller than parametric. So max p(t) (q φ) (t) 2, for particular φ, t I is an upper bound for Hausdorff distance. 29 / 44

Problem: How to chose an appropriate φ? How to determine a required maximum? In some special cases parametric distance can be simplified. Radial distance for circular arcs. The distance between circular arc and parametric curve p = [x, y] T is measured in radial direction. x(t) 2 + y(t) 2 1 1 2 x(t) 2 + y(t) 2 1. 30 / 44

Approximation by Quadratic Curve Find an appoximant of the form p 2 (t) = 2 P j Bj 2 (t) = P 0 (1 t) 2 + P 1 2t(1 t) + P 2 t 2. j=0 Clearly: P 0 = [cos ϕ, sin ϕ] T, P 2 = [cos ϕ, sin ϕ] T. Simple geometry implies P 1 = [sec ϕ, 0] T. No additional free parameters to be used. 31 / 44

Figure: Approximation of circular arc (blue dashed) by quadratic Bézier curve (red). 32 / 44

Let e ϕ := max p(t) 2 2 1. t [0,1] We are interested in e ϕ as a function of ϕ. It is easy to see e ϕ = max p(t) 2 2 1 = p2 (1/2) 2 2 1. t [0,1] Some further derivation implies e ϕ = sin4 ϕ 4 cos 2 ϕ = ϕ4 4 + ϕ6 12 + O ( ϕ 8). 33 / 44

Asymptotic approximation order is 4. The same is true also for Taylor approximants of degree 2. But we did a progress in interpolating two points and two tangent directions. Can we do better using Bézier curves of degree 3? 34 / 44

Approximation by Cubic Curve Let 3 p 3 (t) = P j Bj 3 (t). j=0 Basic properties of Bézier curves imply P 0 = [cos ϕ, sin ϕ] T, P 1 = [cos ϕ, sin ϕ] + d [sin ϕ, cos ϕ] T, P 2 = [cos ϕ, sin ϕ] + d [sin ϕ, cos ϕ] T, P 3 = [cos ϕ, sin ϕ] T. 35 / 44

P 3 d P 2 P 1 d P 0 Figure: Sketch of an approximation by cubic Bézier curve. 36 / 44

We are free to choose a parameter d. Different choices imply different approximants. One possibility is to choose d in a way that we minimize e ϕ := max p3 (t) 2 2 1. t [0,1] This can be done in several ways: one can, e. g., require p 3 (1/2) 2 2 1 = 0. 37 / 44

Figure: Several approximations of circular arc given by central angle 2π/3 (blue dashed) by cubic Bézier curve: d = 4/3 tan(ϕ/2) (red), d = 1/2 (magenta) and d = 3/2 (black). 38 / 44

Figure: Approximation of circular arc given by central angle ϕ = 5 π/3. 39 / 44

We can generalize this approach to approximants od higher order. Analysis of the existence of the solution is much more complicated. Systems of nonlinear equations appear. Open problem: for each n N there exists a Bézier curve of degree n, which interpolates two points and two tangent directions. Its approximation order is 2 n. 40 / 44

Approximants of particular segments can be put together. The results are splines. For circular arcs it is very easy, since only rotations of segments for 2 ϕ are required. The resulting spline is G 1 continuous, sometimes even G 2 continuous. 41 / 44

42 / 44

Figure: Approximation of a whole circle by cubic spline of four pieces. The parameter d is not chosen optimally.the outer spline corresponds to d which is to large, and the inner spline corresponds to d which is to small. 43 / 44

Any questions? 44 / 44