B-Splines and NURBS Week 5, Lecture 9



Similar documents
The Transport Equation

Chapter 7. Response of First-Order RL and RC Circuits

4 Convolution. Recommended Problems. x2[n] 1 2[n]

Differential Equations. Solving for Impulse Response. Linear systems are often described using differential equations.

Direc Manipulaion Inerface and EGN algorithms

AP Calculus AB 2013 Scoring Guidelines

Signal Rectification

Stock Trading with Recurrent Reinforcement Learning (RRL) CS229 Application Project Gabriel Molina, SUID

AP Calculus BC 2010 Scoring Guidelines

Mathematics in Pharmacokinetics What and Why (A second attempt to make it clearer)

MTH6121 Introduction to Mathematical Finance Lesson 5

17 Laplace transform. Solving linear ODE with piecewise continuous right hand sides

Analogue and Digital Signal Processing. First Term Third Year CS Engineering By Dr Mukhtiar Ali Unar

Economics Honors Exam 2008 Solutions Question 5

CHARGE AND DISCHARGE OF A CAPACITOR

Signal Processing and Linear Systems I

11/6/2013. Chapter 14: Dynamic AD-AS. Introduction. Introduction. Keeping track of time. The model s elements

Cointegration: The Engle and Granger approach

Appendix A: Area. 1 Find the radius of a circle that has circumference 12 inches.

1 A B C D E F G H I J K L M N O P Q R S { U V W X Y Z 1 A B C D E F G H I J K L M N O P Q R S { U V W X Y Z

Random Walk in 1-D. 3 possible paths x vs n. -5 For our random walk, we assume the probabilities p,q do not depend on time (n) - stationary

Duration and Convexity ( ) 20 = Bond B has a maturity of 5 years and also has a required rate of return of 10%. Its price is $613.

A Curriculum Module for AP Calculus BC Curriculum Module

Multiprocessor Systems-on-Chips

SMOOTHERS AND THEIR APPLICATIONS IN AUTONOMOUS SYSTEM THEORY. J. E. Palomar Tarancón. A.M.S. (MOS) Subject Classification Codes. 44A05, 34A99, 18B99

The Torsion of Thin, Open Sections

Stochastic Optimal Control Problem for Life Insurance

AP Calculus AB 2010 Scoring Guidelines

Stability. Coefficients may change over time. Evolution of the economy Policy changes

Pulse-Width Modulation Inverters

1. y 5y + 6y = 2e t Solution: Characteristic equation is r 2 5r +6 = 0, therefore r 1 = 2, r 2 = 3, and y 1 (t) = e 2t,

The Application of Multi Shifts and Break Windows in Employees Scheduling

NURBS Drawing Week 5, Lecture 10

PENSION REFORM IN BELGIUM: A NEW POINTS SYSTEM BETWEEN DB and DC

PROFIT TEST MODELLING IN LIFE ASSURANCE USING SPREADSHEETS PART ONE

RC (Resistor-Capacitor) Circuits. AP Physics C

ANALYSIS AND COMPARISONS OF SOME SOLUTION CONCEPTS FOR STOCHASTIC PROGRAMMING PROBLEMS

Optimal Investment and Consumption Decision of Family with Life Insurance

Chapter 13. Network Flow III Applications Edge disjoint paths Edge-disjoint paths in a directed graphs

Full-wave rectification, bulk capacitor calculations Chris Basso January 2009

On the degrees of irreducible factors of higher order Bernoulli polynomials

Inductance and Transient Circuits

NURBS Drawing Week 5, Lecture 10

9. Capacitor and Resistor Circuits

The naive method discussed in Lecture 1 uses the most recent observations to forecast future values. That is, Y ˆ t + 1

The Derivative of a Constant is Zero

Acceleration Lab Teacher s Guide

A Probability Density Function for Google s stocks

Capacitors and inductors

Product Operation and Setup Instructions

Permutations and Combinations

Differential Equations and Linear Superposition

Performance Center Overview. Performance Center Overview 1

Nikkei Stock Average Volatility Index Real-time Version Index Guidebook

Journal Of Business & Economics Research September 2005 Volume 3, Number 9

cooking trajectory boiling water B (t) microwave time t (mins)

Vector Autoregressions (VARs): Operational Perspectives

Real-time avatar animation steered by live body motion

Principal components of stock market dynamics. Methodology and applications in brief (to be updated ) Andrei Bouzaev, bouzaev@ya.

Statistical Analysis with Little s Law. Supplementary Material: More on the Call Center Data. by Song-Hee Kim and Ward Whitt

Chapter 2 Kinematics in One Dimension

Chapter 8: Regression with Lagged Explanatory Variables

Behavior Analysis of a Biscuit Making Plant using Markov Regenerative Modeling

Example What is the minimum bandwidth for transmitting data at a rate of 33.6 kbps without ISI?

CLASSICAL TIME SERIES DECOMPOSITION

The Greek financial crisis: growing imbalances and sovereign spreads. Heather D. Gibson, Stephan G. Hall and George S. Tavlas

Answer, Key Homework 2 David McIntyre Mar 25,

Morningstar Investor Return

Chapter 4: Exponential and Logarithmic Functions

E0 370 Statistical Learning Theory Lecture 20 (Nov 17, 2011)

AP Calculus AB 2007 Scoring Guidelines

Strategic Optimization of a Transportation Distribution Network

I. Basic Concepts (Ch. 1-4)

Small Menu Costs and Large Business Cycles: An Extension of Mankiw Model *

The option pricing framework

SOLID MECHANICS TUTORIAL GEAR SYSTEMS. This work covers elements of the syllabus for the Edexcel module 21722P HNC/D Mechanical Principles OUTCOME 3.

Mortality Variance of the Present Value (PV) of Future Annuity Payments

DATA SHEET. 1N4148; 1N4446; 1N4448 High-speed diodes DISCRETE SEMICONDUCTORS Sep 03

WHAT ARE OPTION CONTRACTS?

The Heisenberg group and Pansu s Theorem

SELF-EVALUATION FOR VIDEO TRACKING SYSTEMS

Newton s Laws of Motion

A Note on Using the Svensson procedure to estimate the risk free rate in corporate valuation

Representing Topological Relationships for Moving Objects

Chapter 8 Student Lecture Notes 8-1

Module 3. R-L & R-C Transients. Version 2 EE IIT, Kharagpur

Single-machine Scheduling with Periodic Maintenance and both Preemptive and. Non-preemptive jobs in Remanufacturing System 1

Steps for D.C Analysis of MOSFET Circuits

A Natural Feature-Based 3D Object Tracking Method for Wearable Augmented Reality

PI4ULS5V202 2-Bit Bi-directional Level Shifter with Automatic Sensing & Ultra Tiny Package

Module 3 Design for Strength. Version 2 ME, IIT Kharagpur

TEMPORAL PATTERN IDENTIFICATION OF TIME SERIES DATA USING PATTERN WAVELETS AND GENETIC ALGORITHMS

Transcription:

CS 430/536 Compuer Graphics I B-Splines an NURBS Wee 5, Lecure 9 Davi Breen, William Regli an Maxim Peysahov Geomeric an Inelligen Compuing Laboraory Deparmen of Compuer Science Drexel Universiy hp://gicl.cs.rexel.eu

Types of Curves Splines B-splines NURBS Ouline Kno sequences Effecs of he weighs 2

Splines Popularize in lae 960s in US Auo inusry (GM) R. Riesenfel (972) W. Goron Origin: he hin woo or meal srips use in builing/ship consrucion Goal: efine a curve as a se of piecewise simple polynomial funcions connece ogeher 3

Naural Splines Mahemaical represenaion of physical splines C 2 coninuous Inerpolae all conrol poins Have Global conrol (no local conrol) P 0 P P n-2 P n P n- P 2 4

B-splines: Basic Ieas Similar o Bézier curves Smooh blening funcion imes conrol poins Bu: Blening funcions are non-zero over only a small par of he parameer range (giving us local suppor) When nonzero, hey are he concaenaion of smooh polynomials. (They are piecewise!) 5

B-spline: Benefis User efines egree Inepenen of he number of conrol poins Prouces a single piecewise curve of a paricular egree No nee o sich ogeher separae curves a juncion poins Coninuiy comes for free 6

Define similarly o Bézier curves p i are he conrol poins Compue wih basis funcions (Basis-splines) B-spline basis funcions are blening funcions Each poin on he curve is efine by he blening of he conrol poins (B i is he i-h B-spline blening funcion) p( ) B-splines = i= 0 B i is zero for mos values of! m B ( ) i, p i 7

8 ) ( ) ( ) ( oherwise 0, if, ) (,,,,0 B B B B = < = B-splines: Cox-eBoor Recursion Cox-eBoor Algorihm: efines he blening funcions for spline curves (no limie o eg 3) curves are weighe avgs of lower egree curves Le enoe he i-h blening funcion for a B-spline of egree, hen: ) (, B i

B-spline Blening Funcions B, ) 0 ( B, () B, 2 ( B, 3 ( is a sep funcion ha is in he inerval spans wo inervals an is a piecewise linear funcion ha goes from 0 o (an bac) ) spans hree inervals an is a piecewise quaraic ha grows from 0 o /4, hen up o 3/4 in he mile of he secon inerval, bac o /4, an bac o 0 ) is a cubic ha spans four inervals growing from 0 o /6 o 2/3, hen bac o /6 an o 0 B-spline blening funcions 9 Pics/Mah couresy of Dave Moun @ UMD-CP

B-spline Blening Funcions: Example for 2 n Degree Splines Noe: can efine a polynomial wih hese properies (boh 0 an non-zero for ranges) Iea: subivie he parameer space ino inervals an buil a piecewise polynomial Each inerval ges ifferen polynomial funcion 0 Pics/Mah couresy of Dave Moun @ UMD-CP

B-spline Blening Funcions: Example for 3 r Degree Splines p( ) = m i= 0 B i, ( ) p i Observe: a =0 an = jus four of he funcions are non-zero all are >=0 an sum o, hence he convex hull propery hols for each curve segmen of a B-spline 994 Foley/VanDam/Finer/Huges/Phillips ICG

B-splines: Kno Selecion Insea of woring wih he parameer space 0, use min 0 2... m The no poins join poins beween curve segmens, Q i Each has a no value m- nos for m poins 2 max 994 Foley/VanDam/Finer/Huges/Phillips ICG

Specifie by m 3 Uniform B-splines: Seing he Opions m conrol poins, P 0 P m m-2 cubic polynomial curve segmens, Q 3 Q m m- no poins, 3 m segmens Q i of he B-spline curve are efine over a no inerval [ i, i ] efine by 4 of he conrol poins, P i-3 P i segmens Q i of he B-spline curve are blene ogeher ino smooh ransiions via (he new & improve) blening funcions 4

Example: Creaing a B-spline m p( ) = B ( p m = 9 i= 0 i, ) i 0 conrol poins 8 no poins 7 segmens 5 994 Foley/VanDam/Finer/Huges/Phillips ICG

B-spline: Kno Sequences Even isribuion of nos uniform B-splines Curve oes no inerpolae en poins firs blening funcion no equal o a =0 Uneven isribuion of nos non-uniform B-splines Allows us o ie own he enpoins by repeaing no values (in Cox-eBoor, 0/0=0) If a no value is repeae, i increases he effec (weigh) of he blening funcion a ha poin If no is repeae imes, blening funcion converges o an he curve inerpolaes he conrol poin 6

7 B i, () ) ( ) ( ) ( oherwise 0, if, ) (,,,,0 B B B B = < = B-splines: Cox-eBoor Recursion Cox-eBoor Algorihm: efines he blening funcions for spline curves (no limie o eg 3) curves are weighe avgs of lower egree curves Le enoe he i-h blening funcion for a B-spline of egree, hen:

Creaing a Non-Uniform B-spline: Kno Selecion Given curve of egree =3, wih m conrol poins firs, creae m no values use no values (0,0,0,,2,, m-2, m-,m-,m-) (aing wo exra 0 s an m- s) Noe Causes Cox-eBoor o give ae weigh in blening o he firs an las poins when is near min an max 8 Pics/Mah couresy of G. Farin @ ASU

B-splines: Muliple Knos Kno Vecor {0.0, 0.0, 0.0, 3.0, 4.0, 5.0, 6.0, 7.0} Several consecuive nos ge he same value Changes he basis funcions! 9 From hp://evworl.apple.com/ev/echsuppor/evelop/issue25/schneier.hml

20 B-spline Summary = = m i i i p B p 0, ) ( ) ( ) ( ) ( ) ( oherwise 0, if, ) (,,,,0 B B B B = < =

Waching Effecs of Kno Selecion 0 0 2 3 4 5 6 7 8 9 9 no poins (iniially) Noe: nos are isribue paramerically base on, hence why hey move 0 conrol poins Curves have as many segmens as hey have non-zero inervals in u egree of curve 2 Pics/Mah couresy of G. Farin @ ASU

B-splines: Local Conrol Propery Local Conrol polynomial coefficiens epen on a few poins moving conrol poin (P 4 ) affecs only local curve Why: Base on curve ef n, affece region exens a mos 2 no poins away 22 994 Foley/VanDam/Finer/Huges/Phillips ICG

B-splines: Local Conrol Propery 23 Recore from: hp://heim.ifi.uio.no/~ronbre/osloalgapp.hml

B-splines: Convex Hull Propery The effec of muliple conrol poins on a uniform B-spline curve 25 994 Foley/VanDam/Finer/Huges/Phillips ICG

B-splines: Coninuiy Derivaives are easy for cubics p( u) = = 0 Derivaive: p ( u) = c 2c u c u 3 u c 2 3 3 2 Easy o show C 0, C, C 2 26

B-splines: Seing he Opions How o space he no poins? Uniform equal spacing of nos along he curve Non-Uniform Which ype of parameric funcion? Raional x(), y(), z() efine as raio of cubic polynomials Non-Raional 27

NURBS A he core of several moern CAD sysems I-DEAS, Pro/E, Alpha_ Describes analyic an freeform shapes Accurae an efficien evaluaion algorihms Invarian uner affine an perspecive ransformaions 28 U of Uah, Alpha_

Benefis of Raional Spline Curves Invarian uner roaion, scale, ranslaion, perspecive ransformaions ransform jus he conrol poins, hen regenerae he curve (non-raionals only invarian uner roaion, scale an ranslaion) Can precisely efine he conic secions an oher analyic funcions conics require quaraic polynomials conics only approximae wih non-raionals 29

NURBS Non-uniform Raional B-splines: NURBS Basic iea: four imensional non-uniform B-splines, followe by normalizaion via homogeneous coorinaes If P i is [x, y, z, ], resuls are invarian wr perspecive projecion Also, recall in Cox-eBoor, no spacing is arbirary nos are close ogeher, influence of some conrol poins increases Duplicae nos can cause poins o inerpolae e.g. Knos = {0, 0, 0, 0,,,, } creae a Bézier curve 30

Raional Funcions Cubic curve segmens X ( ) Y ( ) x ( ) =, y( ) =, z( ) = W ( ) W ( ) where X ( ), Y ( ), Z( ), W ( ) are all cubic polynomials wih conrol poins specifie in homogenous coorinaes, [x,y,z,w] Noe: for 2D case, Z( ) = 0 Z( ) W ( ) 3

Raional Funcions: Example Example: raional funcion: a raio of polynomials a raional parameerizaion in u of a uni circle in xy-plane: a uni circle in 3D homogeneous coorinaes: 32

NURBS: Noaion Aler Depening on he source/reference Blening funcions are eiher ( ) or Parameer variable is eiher u or Curve is eiher C or P or Q Conrol Poins are eiher P i or B i Variables for orer, egree, number of conrol poins ec are frusraingly inconsisen, i, j, m, n, p, L,,. B i, u N i, ( u) 33

NURBS: Noaion Aler. If efine using homogenous coorinaes, he 4 h (3 r for 2D) imension of each P i is he weigh 2. If efine as weighe eucliian, a separae consan w i, is efine for each conrol poin 34

NURBS A -h egree NURBS curve C is ef as: Where C = = 0, ( ) i i i u n n w B w B i= 0 i i, ( u) P ( u) conrol poins, -h egree B-spline blening funcions, i B i, ( u) he weigh, w i, for conrol poin P i (when all w i =, we have a B-spline curve) 35

Observe: Weighs Inuce New Raional Basis Funcions, R Seing: R i ( u) = n i= 0 w B i i i, w B ( u) i, ( u) Allows us o wrie: Where R i, ( u) ( u) R ( u) = i= are raional basis funcions u [0,] piecewise raional basis funcions on C weighs are incorporae ino he basis fcns n 0 i, P i 36

Geomeric Inerpreaion of NURBS Wih Homogeneous coorinaes, a raional n- D curve is represene by polynomial curve in (n)-d Homogeneous 3D conrol poins are wrien as: in 4D where To ge, ivie by w i a perspecive ransform wih cener a he origin Noe: weighs can allow final curve shape o go ousie he convex hull (i.e. negaive w) 37

NURBS: Examples Unif. Kno Vecor Non-Unif. Kno Vecor {0.0,.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0} {0.0,.0, 2.0, 3.75, 4.0, 4.25, 6.0, 7.0} 38 From hp://evworl.apple.com/ev/echsuppor/evelop/issue25/schneier.hml

NURBS: Examples Kno Vecor {0.0, 0.0, 0.0, 3.0, 4.0, 5.0, 6.0, 7.0} Several consecuive nos ge he same value Bunches up he curve an forces i o inerpolae 39 From hp://evworl.apple.com/ev/echsuppor/evelop/issue25/schneier.hml

NURBS: Examples Kno Vecor {0.0,.0, 2.0, 3.0, 3.0, 5.0, 6.0, 7.0} Several consecuive nos ge he same value Bunches up he curve an forces i o inerpolae Can be one micurve 40 From hp://evworl.apple.com/ev/echsuppor/evelop/issue25/schneier.hml

The Effecs of he Weighs w i of P i effecs only he range [u i, u i ) If w i =0 hen P i oes no conribue o C If w i increases, poin B an curve C are pulle owar P i an pushe away from P j If w i ecreases, poin B an curve C are pushe away from P i an pulle owar P j If w i approaches infiniy hen B approaches an B i -> P i, if u in [u i, u i ) 4

The Effecs of he Weighs Increase weigh pulls he curve owar B 3 42 From hp://evworl.apple.com/ev/echsuppor/evelop/issue25/schneier.hml

Programming assignmen 3 Inpu PosScrip-lie file conaining polygons Oupu B/W XPM Implemen viewpors Use Suherlan-Hogman inersecion for polygon clipping Implemen scanline polygon filling. (You canno use floo filling) 43