Docsity

Parametric Polynomials in Computer Graphics: Explicit vs Implicit Representation and Cubic, Study notes of Computer Graphics

Partial preview of the text

Download Parametric Polynomials in Computer Graphics: Explicit vs Implicit Representation and Cubic and more Study notes Computer Graphics in PDF only on Docsity!

Introduction toComputer GraphicsFarhana Bandukwala, PhD

Lecture 7: Parametric Polynomials

Outline

• Explicit vs Implicit representation• Linear approximation• Parametric form• Polynomial cubic curves

Implicit Representation

• f(x,y)=0• Line: ax+by+c=0• Circle at origin: x

22 +y+r

• Divides 2-D space into points on or offcurve• Intersections of two curve have to satisfyboth equations

Linear approximation

Connected line segments^ Good linear approximation needs several points at high curvature regions

Parametric polynomial curves • Functions x(u) and y(u) are polynomials interms of u• A curve of degree n is p(u)=[

kΣucxk

k,Σucyk

]

for k=1..n• Alternatively p(u)=

kΣuck

where

c=[ck

, cxkyk

]

Design criteria for curves • Local control of shape: simple curve segments joinedtogether provide better shape control• Continuity and smoothness: touching segments andsmooth transition between segments• Derivative which can be evaluated: to evaluatesmoothness• Stability: smooth changing of parameters leads tointuitive changes in curve segment• Ease of rendering

Parametric cubic curves

•^ High degree: complex curve w/many parameters•^ Low degree: not enough control•^ Cubic curves are preferred as good balance•^ p(u)=cx

+cu+cx0x

2 u+cx

3 u(x component)x

1 u^

(^2 3) u u^

cx0 cx1 cx2 cx

Matrix form: p

T(u)=ux

c

Interpolation

-^ Problem: given 4 2D points, find interpolating curve•^ Alternatively: find coefficients

c

-^ Suppose points are at u=0,1/3,2/3,1^ (x,y)^0 0 (x^1

,y) 1 (x,y)^2 2 (x,y^3

p^ (0) = cx^ x0 p^ (1/3) = cx^

  • c(1/3) + cx0 x^

(^2) (1/3) + cx

(^3) (1/3)x

p^ (2/3) = cx^

  • c(2/3) + cx0 x^

(^2) (2/3) + cx

(^3) (2/3)x

p^ (1) = cx^ x

  • c(1) + c x^

(^2) (1) + cx2 x

x^1 0 x^1 = x^2 x^3

1 1/^

3 1 2/^

3 1 1

cx0 cx1 cx2 cx