CS770/870 Spring 2017 Curve Generation

Similar documents
B-Spline Polynomials. B-Spline Polynomials. Uniform Cubic B-Spline Curves CS 460. Computer Graphics

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

3D Modeling Parametric Curves & Surfaces

Curves and Surfaces 1

Representing Curves Part II. Foley & Van Dam, Chapter 11

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Curves. Computer Graphics CSE 167 Lecture 11

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

2D Spline Curves. CS 4620 Lecture 13

Curves and Surfaces Computer Graphics I Lecture 9

Sung-Eui Yoon ( 윤성의 )

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

An introduction to interpolation and splines

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

Geometric Modeling of Curves

Bezier Curves, B-Splines, NURBS

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

2D Spline Curves. CS 4620 Lecture 18

Need for Parametric Equations

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

Intro to Curves Week 4, Lecture 7

Computer Graphics Curves and Surfaces. Matthias Teschner

Curves and Surfaces Computer Graphics I Lecture 10

Computer Graphics. Curves and Surfaces. Hermite/Bezier Curves, (B-)Splines, and NURBS. By Ulf Assarsson

Know it. Control points. B Spline surfaces. Implicit surfaces

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

LECTURE #6. Geometric Modelling for Engineering Applications. Geometric modeling for engineering applications

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006

Curves and Surfaces. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd

CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2

COMP3421. Global Lighting Part 2: Radiosity

On an approach for cubic Bézier interpolation

Objects 2: Curves & Splines Christian Miller CS Fall 2011

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

Advanced Graphics. Beziers, B-splines, and NURBS. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Rational Bezier Surface

Readings on Bézier Curves and Surfaces. 1 Additional Reading. 2 Organization. 3 Introduction. 4 Representing Curves

Intro to Curves Week 1, Lecture 2

GL9: Engineering Communications. GL9: CAD techniques. Curves Surfaces Solids Techniques

The Free-form Surface Modelling System

Curves D.A. Forsyth, with slides from John Hart

Design considerations

Central issues in modelling

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

B-spline Curves. Smoother than other curve forms

Approximation of 3D-Parametric Functions by Bicubic B-spline Functions

Almost Curvature Continuous Fitting of B-Spline Surfaces

Rational Bezier Curves

Lecture 2.2 Cubic Splines

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Information Coding / Computer Graphics, ISY, LiTH. Splines

CS 475 / CS Computer Graphics. Modelling Curves 3 - B-Splines

Curves & Surfaces. MIT EECS 6.837, Durand and Cutler

Computergrafik. Matthias Zwicker. Herbst 2010

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

form. We will see that the parametric form is the most common representation of the curve which is used in most of these cases.

Further Graphics. Bezier Curves and Surfaces. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

08 - Designing Approximating Curves

Simple Keyframe Animation

Intro to Modeling Modeling in 3D

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur

CS-184: Computer Graphics. Today

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Bezier Curves. An Introduction. Detlef Reimers

CS130 : Computer Graphics Curves. Tamar Shinar Computer Science & Engineering UC Riverside

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Lecture 21 of 41. Animation Basics Lab 4: Modeling & Rigging in Maya

TO DUY ANH SHIP CALCULATION

Outline. The de Casteljau Algorithm. Properties of Piecewise Linear Interpolations. Recall: Linear Interpolation

Outline. Properties of Piecewise Linear Interpolations. The de Casteljau Algorithm. Recall: Linear Interpolation

Les Piegl Wayne Tiller. The NURBS Book. Second Edition with 334 Figures in 578 Parts. A) Springer

Friday, 11 January 13. Interpolation

CS559 Computer Graphics Fall 2015

Computer Graphics Lecture 5

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

Curves and Surfaces for Computer-Aided Geometric Design

CS-184: Computer Graphics

Connected Minimal Acceleration Trigonometric Curves

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313

Lecture 9: Introduction to Spline Curves

A MATRIX FORMULATION OF THE CUBIC BÉZIER CURVE

Splines. Connecting the Dots

Computer Graphics Splines and Curves

Spline Notes. Marc Olano University of Maryland, Baltimore County. February 20, 2004

EECS 487: Interactive Computer Graphics f

Hidden Surface Removal. 3D Graphics with OpenGL. Back-Face Culling

Directional Derivatives and the Gradient Vector Part 2

Developing an Approach to Redesign Freeform Surfaces Using B-Spline Technique

Numerical Analysis Timothy Sauer Second Edition

Ray scene intersections

Numerical Methods in Physics Lecture 2 Interpolation

Rendering Curves and Surfaces. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

Quasilinear First-Order PDEs

CAGD PACKAGE FOR MATHEMATICA AND ITS USAGE IN THE TEACHING

Transcription:

CS770/870 Spring 2017 Curve Generation Primary resources used in preparing these notes: 1. Foley, van Dam, Feiner, Hughes, Phillips, Introduction to Computer Graphics, Addison-Wesley, 1993. 2. Angel, Interactive Computer Graphics A top-down approach with OpenGL, Addison-Wesley, 1998. 3. Wikipedia for several images. 04/09/2017 1 Curve and Surface Generation Fundamental applications Curve/surface fitting given sample data, determining a curve or surface that approximates that data in a compact form Modeling: designing a curve or surface for designing and producing parts for realistic image generation 2

2D Parametric Curves f(t)=[x(t),y(t)] linear: x(t) = x0 + t(x1-x0) = ax + bxt y(t) = y0 + t(y1-y0) = ay + byt quadratic: x(t) = ax + bxt + cxt 2 y(t) = ay + byt + cyt 2 cubic: x(t) = ax + bxt + cxt 2 + dxt 3 y(t) = ay + byt + cyt 2 + dyt 3 3 3D Parametric Curves f(t)=[x(t),y(t),z(t)] linear: x(t) = x0 + t(x1-x0) = ax + bxt y(t) = y0 + t(y1-y0) = ay + byt z(t) = z0 + t(z1-z0) = az + bzt quadratic: x(t) = ax + bxt + cxt 2 y(t) = ay + byt + cyt 2 z(t) = az + bzt + czt 2 cubic: x(t) = ax + bxt + cxt 2 + dxt 3 y(t) = ay + byt + cyt 2 + dyt 3 y(t) = az + bzt + czt 2 + dzt 3 4

Notation Cubic: x(t) = ax + bxt + cxt 2 + dxt 3 y(t) = ay + byt + cyt 2 + dyt 3 y(t) = az + bzt + czt 2 + dzt 3 1 Let ax bx cx dx t T= M= ay by cy dy az bz cz dz Then C(t) = [x(t) y(t) z(t)] T = MT t 2 t 3 5 What good is a cubic polynomial? Consider x(t) = 0.2t 3-2t 2 + t + 1 y(t) = -0.3t 3-0.2t 2-2t + 5-3 < t < 3 Simple polynomial; simple to plot But, how can we predict how to use it? How to determine coefficients for a particular desired curve or surface? piecewise curves and surfaces sample points control points 6

Hermite Interpolation Each segment defined by 2 points and 2 tangents There are 4 blending functions (cubic polynomials), t = [0,1], p0(t), p1(t), v0(t), v1(t). Blending functions P0 V0 V1 P1 p0 p1 v0 [x(t),y(t)] T =P0p0(t)+P1p1(t)+V0v0(t)+V1 v1(t) v1 7 Hermite Interpolation-2 Add P2 and V2 to get longer curve (for t=[1,2]) Get C 0 continuity of joined segments at P1 G 1 continuity (1st deriv.) at P1 if V1 is parallel to V 1 Multiple joined segments make longer curves Curve interpolates all the points V0 V1 C 1 parametric continuity: tangents equal. G 1 geometric continuity: tangents parallel. P0 P1 V 1 V2 P2 8

Bezier Curves Replace explicit tangents at interpolating points with extra control points that define tangents at ends, but also modify intermediate points Blending functions are all >=0 b0(t) = (1-t) 3 b1(t) = 3t(1-t) 2 b2(t) = 3t 2 (1-t) bs(t) = t 3 b(t) = P0b0(t)+P1b1(t)+P2b2(t)+P3b3(t) 9 Bezier Matrix formulation Can compactly express the blending function operation as matrix operations Mb= b(t) = PMbT where P = 1 0 0 0-3 3 0 0 3-6 3 1-1 3-3 1 x0 x1 x2 x3 y0 y1 y2 y3 z0 x1 z2 z3 T= 1 t t 2 t 3 P0=(x0 y0 z0) P1=(x1 y1 z1) P2=(x2 y2 z2) P3=(x3 y3 z3) 10

Uniform B-Splines B-splines are better than Bezier curves for joining multiple short curve segments Each piece of a B-spline curve depends on only a few control points, and there is better control over continuity between the pieces Key difference: B-spline curve segment share multiple control points Cubic B-spline has 4 control points/segment segment i shares 3 CP with segment i+1 11 Uniform Cubic B-spline Curve 4 Control points define a curve segment 5 control points define 2 http://geometrie.foretnik.net/files/nurbs-en.swf Can replicate end points to get closed curves or curves that start at first and/or last CP www.ibiblio.org/e-notes/splines.html 12

Unif B-Spline Matrix formulation Can compactly express the blending function operation as matrix operations MB= 1 6 b(t) = PMBT where P = 1 4 1 0-3 0 3 0 3-6 3 0-1 3-3 1 x0 x1 x2 x3 y0 y1 y2 y3 z0 x1 z2 z3 T= 1 t t 2 t 3 P0=(x0 y0 z0) P1=(x1 y1 z1) P2=(x2 y2 z2) P3=(x3 y3 z3) 13 Uniform B-Spline Blending Curves Blending functions are all >=0 b0(t) = (1-t) 3 b1(t) = 4-6t 2 +3t 3 b2(t) = 1+3t+3t 2-3t 2 bs(t) = t 3 b(t) = P0b0(t)+P1b1(t)+P2b2(t)+P3b3(t) 14

Non-uniform B-Splines Uniform B-Splines distribute the t parameter values equally for all segments. Given 4 segments t can range from (0,0.25) for the 1st, (0.25,0.5) for the 2nd, etc. Very easy for t to be (0,1) for 1st, (1,2) for 2nd, etc. Either way, the join positions are called knots. Knots can be defined at any ordered set of t values http://www.ibiblio.org/e-notes/splines/none.html http://geometrie.foretnik.net/files/nurbs-en.swf 15 Resources NURBS: non-uniform rational B-Splines demo http://nurbscalculator.in http://geometrie.foretnik.net/files/nurbs-en.swf Cubic Bezier spline patch https://www.ibiblio.org/e-notes/splines/bezier3d.html 16