#7: Cubic Curves CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006Slide 2
Outline throughout today Inverses of Transforms Curves diagram B Ã© zier bendsSlide 3
Graphics pipeline changes Remember the arrangement of changes in the representation funnel: M - model: spots object in world space C - camera: places camera in world space P - projection: from camera space to standardized perspective space D - viewport: remaps to picture facilitates And recollect about C: helpful for situating the camera as a model in reverse for the pipeline: we have to get from world space to camera space So we have to utilize C - 1 Youâll need it for task 4: OpenGL needs you to load C - 1 as the base of the MODELVIEW stackSlide 4
How would we get C - 1 ? Could build C , and utilize a grid backwards routine Would work. Be that as it may, generally moderate. Also, we didnât give you one :) Instead, letâs develop C - 1 specifically in view of how we built C in light of alternate ways and tenets for relative changesSlide 5
Inverse of an interpretation Translate back, i.e., invalidate the interpretation vector Easy to check:Slide 6
Inverse of a Scale by the inverses Easy to confirm:Slide 7
Inverse of a turn Rotate about the same hub, with the restrict edge: Inverse of a pivot is the transpose: Columns of a pivot framework are orthonormal A T A creates all columnsâ spot item mixes as network Dot result of a section with itself = 1 (on the corner to corner) Dot result of a segment with some other segment = 0 (off the askew)Slide 8
Inverses of structure If you have a progression of changes formed togetherSlide 9
Composing with inverses, pictorially To travel between various spaces, make along bolts Backwards along bolt: utilize opposite changeSlide 10
Model-to-Camera change Camera-to-world C Model-to-Camera = C - 1 M y z x Camera SpaceSlide 11
The take a gander at change Remember, we developed C utilizing the take a gander at expression:Slide 12
C - 1 from a,b,c,d segmentsSlide 13
Outline throughout today Inverses of Transforms Curves review B Ã© zier bendsSlide 14
Usefulness of bends in demonstrating Surface of unrestSlide 15
Usefulness of bends in displaying Extruded/cleared surfacesSlide 16
Usefulness of bends in demonstrating Surface patchesSlide 17
Usefulness of bends in liveliness Provide a âtrackâ for articles http://www.f-lohmueller.de/Slide 18
Usefulness of bends in activity Specify parameter values after some time: 2D bend edtiorSlide 19
How to speak to bends Specify each point along a bend? Utilized infrequently as âfreehand attracting modeâ 2D applications Hard to get exact results Too much information, too difficult to work with for the most part Specify a bend utilizing a little number of âcontrol pointsâ Known as a spline bend or just splineSlide 20
Interpolating Splines Specify focuses, the bend experiences every one of the focuses Seems most natural Surprisingly, not for the most part the best decision. Difficult to anticipate conduct Overshoots Wiggles Hard to get ânice-lookingâ bendsSlide 21
Approximating Splines âInfluencedâ by control focuses however not so much experience them. Different sorts & procedures Most regular: (Piecewise) Polynomial Functions Most normal of those: B Ã© zier B-spline Each has great properties Weâll concentrate on B Ã© zier splinesSlide 22
What is a bend, at any rate? We draw it, consider it a thing existing in space But scientifically we regard it as a capacity, x (t) Given an estimation of t , figures a point x Can think about the capacity as moving a point along the bend x (t) z x (0.0) x (0.5) x (1.0) y xSlide 23
T he digression to the bend Vector focuses toward development (Length is the pace toward development) Also an element of t , x (t) z x â(0.0) x â(0.5) x â(1.0) y xSlide 24
Polynomial Functions Linear: (1 st request) Quadratic: (2 nd request) Cubic: (3 rd request)Slide 25
Point-esteemed Polynomials (Curves) Linear: (1 st request) Quadratic: (2 nd request) Cubic: (3 rd request) Each is 3 polynomials âin parallelâ: We as a rule characterize the bend for 0 â¤ t â¤ 1Slide 26
How much do you have to indicate? Two focuses characterize a line (1 st request) Three focuses characterize a quadratic bend (2 nd request) Four focuses characterize a cubic bend (3 rd request) k+1 focuses characterize a k - request bend Letâs begin with a lineâ¦Slide 27
Linear Interpolation Linear introduction , AKA Lerp Generates an esteem that is some place in the middle of two different qualities A âvalueâ could be a number, vector, shading, â¦ Consider interjecting between two focuses p 0 and p 1 by some parameter t This characterizes a âcurveâ that is straight. Otherwise known as a first-arrange spline When t=0 , we get p 0 When t=1 we get p 1 When t=0.5 we get the midpoint . p 1 t =1 . p 0 0< t <1 t =0Slide 28
Linear interjection We can compose this in three ways All the very same mathematical statement Just diverse methods for taking a gander at it Different properties get to be evidentSlide 29
Linear introduction as weighted normal Each weight is an element of t The weights\' entirety is dependably 1, for any estimation of t Also known as mixing capacitiesSlide 30
Linear insertion as polynomial Curve is based at point p 0 Add the vector, scaled by t . p 1 - p 0 . . p 0 .5( p 1 - p 0 )Slide 31
Linear introduction in grid structureSlide 32
Linear Interpolation: digression For a straight line, the digression is consistentSlide 33
Outline throughout today Inverses of Transforms Curves review B Ã© zier bendsSlide 34
B Ã© zier Curves Can be considered as a higher request expansion of direct insertion p 1 p 1 p 2 p 1 p 3 p 0 p 0 p 0 p 2 Linear Quadratic CubicSlide 35
Cubic Bã©zier Curve Most normal case 4 focuses for a cubic Bã©zier Interpolates the endpoints Midpoints are âhandlesâ that control the digression at the endpoints Easy and instinctive to utilize Many demo applets online http://www.cs.unc.edu/~mantler/research/bezier/http://www.theparticle.com/applets/nyu/BezierApplet/http://www.sunsite.ubc.ca/LivingMathematics/V001N01/UBCExamples/Bezier/bezier.html Convex Hull property Variation-lessening propertySlide 36
Bã©zier Curve Formulation Ways to detail B Ã© zier bends, closely resembling direct : Weighted normal of control focuses - weights are Bernstein polynomials Cubic polynomial capacity of t Matrix frame Also, the de Casteljau calculation: recursive straight interjections Aside: Many of the first CG procedures were produced for Computer Aided Design and assembling. Before amusements, before films, CAD/CAM was the enormous application for CG. Pierre B Ã© zier worked for Peugot, created bends in 1962 Paul de Casteljau worked for Citroen, added to the bends in 1959Slide 37
Bã©zier Curve Find the point x on the bend as a component of parameter t : p 1 â¢ x ( t ) p 0 p 2 p 3Slide 38
de Casteljau Algorithm A recursive arrangement of straight insertions Works for any request. Weâll do cubic Not appallingly productive to assess along these lines Other structures all the more ordinarily utilized So why study it? Kinda flawless Intuition about the geometry Useful for subdivision (later today)Slide 39
de Casteljau Algorithm Start with the control focuses And given an estimation of t In the drawings, tâ0.25 p 1 p 0 p 2 p 3Slide 40
de Casteljau Algorithm p 1 q 1 q 0 p 0 p 2 q 2 p 3Slide 41
de Casteljau Algorithm q 1 r 0 q 0 r 1 q 2Slide 42
de Casteljau Algorithm r 0 â¢ x r 1Slide 43
p 1 â¢ x p 0 p 2 p 3 de Casteljau algorihm Applets http://www2.mat.dtu.dk/individuals/J.Gravesen/cagd/decast.html http://www.caffeineowl.com/design/2d/vectorial/bezierintro.htmlSlide 44
Recursive Linear InterpolationSlide 45
Expand the LerpsSlide 46
Weighted normal of control focuses Group this as a weighted normal of the focuses:Slide 47
B Ã©zier utilizing Bernstein Polynomials Notice: Weights dependably add to 1 B 0 and B 3 go to 1 - interjecting the endpointsSlide 48
General Bernstein PolynomialsSlide 49
General B Ã© zier utilizing Bernstein Polynomials Bernstein polynomial type of a n th-request Bã©zier bend:Slide 50
p 3 p 1 p 0 p 2 Convex Hull Property Construct an arched polygon around an arrangement of focuses The raised frame of the control focuses Any weighted normal of the focuses, with the weights all somewhere around 0 and 1: Known as a curved blend of the focuses Result dependably exists in the curved structure (counting on the outskirt) Bã©zier bend is a raised mix of the control focuses Curve is constantly inside the raised body Very imperative property! Makes bend unsurprising Allows separating Allows crossing point testing Allows versatile tessellationSlide 51
Cubic Equation Form Good for quick assessment: precompute steady coefficients ( a , b , c , d ) Doesnât give much geometric instinct But the geometry can be removed from the coefficientsSlide 52
Aside: direct mixes of focuses Reminder: we canât scale a point or include two focuses Can subtract two focuses Can take weighted normal of focuses if the weights mean one Act on homogeneous focuses: w part of result must be 1 Can likewise take weighted normal of focuses if the weights signify 0 The outcome gives w=0 , i.e. a vector E.g. p - q is the same as (+1) p + (- 1) q Can likewise do (- 1) p 0 +(3) p 1 +(- 3) p 2 +(1) p 3Slide 53
Cubic Equation, vector documentationSlide 54
Cubic Matrix Form Other cubic splines use distinctive premise framework B Hermite, Catmull-Rom, B-Spline, â¦Slide 55
Cubic Matrix Form 3 parallel mathematical statements, in x, y and z:Slide 56
Book is listed and MARC record is gone into online index. Client discovers eBook online ... Book ...
An adjusted marine environment, supportable waterfront ranges and archipelagos ... A changed agr ...
Toss - includes discharging an article and sending it compellingly with the hands. ... A compara ...
Vacuum breaker is introduced at the branch association with a gear thing or pipes apparatus, for ...
Portrayal: Thick grain 2D-3D transformation. System of bends: Fine grain transformation ... sket ...
2D and 3D perspectives: z=0 z=1 z=2. COL EFG QRS. UMB H J TVW. IAD KNP XYZ ... it more confused ...
This diagram demonstrates the trip and-crumple of a reindeer populace ... What's more, with less ...
Landform:Water Spider/Salamander. Water bugs live at the highest point of ... Lizards live in bo ...
Workforce of Informatics, University of Debrecen, Hungary. seventeenth Summer School on Image Pr ...
Key Math for Games. Activity. Issue: need to replay put away arrangement of transformationsGener ...
Sorts of Cost Curves. An aggregate expense bend is the chart of a firm\'s aggregate expense func ...
Span and Frequency. ViewersAverage NumberGRPs = Counted X of Times Once They ViewGRPs = Reach X ...
Scoliosis Screening. Normal Spinal Curvature. There are 4 natural curves in the ver ...
Populations . Possible Test Questions. Explain how biotic potential and/or carrying capacity ...
How to Interpret Titration Curves. find the equivalence point it is the steepest part of the ...
Objectives . Examine the significance of scourge bends as a strategy to graphically portray outb ...
What are Signature Curves?. Mark bends are one of a kind bends which are invariant under Euclide ...
Direct request. A straight request bend may be of the formQx = a0 axPx ayPy aMM.To assess the va ...
2. Lack of interest Curves and Utility Maximization. Minimal utility examination requires some n ...