5
1 DGI - 060426 Curves and surfaces Chapter 11 in book En småuppgift, deadline: 060502 Representation with mathematical surfaces Parametric, e.g. cubic curves: x = x(u) = a x u 3 + b x u 2 + c x u + d x y = y(u) = a y u 3 + b y u 2 + c y u + d y z = z(u) = a z u 3 + b z u 2 + c z u + d z 0 u umax Compare this with: x(u) = a x u + b x y(u) = a y u + b y Why don’t we just use y = f(x) ? instead of x = fx(u) y = fy(u) with 0u1 A curve in 3D can be defined by x = x(u) y = y(u) z = z(u) 0 u umax The tangent can be obtained with a derivative dx = dx(u)/du dy = dy(u)/du dz = dz(u)/du

DGI - 0604263 Bezier, joint point Join two Bezier curves each defined by four control points! What continuity can we expect in the joint point? Småuppgift 9 Beskriv med ord (åtminstone

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DGI - 0604263 Bezier, joint point Join two Bezier curves each defined by four control points! What continuity can we expect in the joint point? Småuppgift 9 Beskriv med ord (åtminstone

1

DGI - 060426Curves and surfacesChapter 11 in book

En småuppgift, deadline: 060502

Representation with mathematical surfaces

Parametric, e.g. cubic curves:

x = x(u) = axu3 + bxu2 + cxu + dxy = y(u) = ayu3 + byu2 + cyu + dyz = z(u) = azu3 + bzu2 + czu + dz

0 ≤ u ≤ umax

Compare this with:x(u) = axu + bxy(u) = ayu + by

Why don’t we just usey = f(x)?

instead ofx = fx(u)y = fy(u)with 0≤u≤1

A curve in 3D can be defined by

x = x(u)y = y(u)z = z(u)

0 ≤ u ≤ umax

The tangent can be obtained with aderivativedx = dx(u)/dudy = dy(u)/dudz = dz(u)/du

Page 2: DGI - 0604263 Bezier, joint point Join two Bezier curves each defined by four control points! What continuity can we expect in the joint point? Småuppgift 9 Beskriv med ord (åtminstone

2

Surface can be defined in the same way

x = x(u,v)y = y(u,v)z = z(u,v)

0 ≤ u ≤ umax, 0 ≤ v ≤ vmax

δx = δx(u,v)/δuδy = δy(u,v)/δuδz = δz(u,v)/δu

δx = δx(u,v)/δvδy = δy(u,v)/δvδz = δz(u,v)/δv

n = δp/δu x δp/δv

p(u) =( 2u3 – 3u2 + 1 ) p0 + (–2u3 + 3u2 ) p3 +( u3 – 2u2 + u ) p’0 + ( u3 – u2 ) p’3

Curves, Hermite

1 0 0 0MH = 0 0 1 0 -3 3 -2 -1 2 -2 1 1

p(u) = uT MH q, where qT = (p0 p3 p’0 p’3)and u = (u3 u2 u 1)

uT MH is a blending function, giving the weights forthe geometric conditions

Hermite, joint point P(u) = c0 P0 + c1 P1 + c2 P2 + c3 P3

Bezier curve demo

http://www.timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm

This web page is a paper on Bezier curves with somemath and demos etc

p(u) =( 1- u )3 p0 + 3u( 1- u )2 p1 +3u2(1-u) p2 + u3 p3

Curves, Bezier

1 0 0 0MH = -3 -3 0 0 3 -6 3 0 -1 3 -3 1

Note: Σ weights = 1

Page 3: DGI - 0604263 Bezier, joint point Join two Bezier curves each defined by four control points! What continuity can we expect in the joint point? Småuppgift 9 Beskriv med ord (åtminstone

3

Bezier, joint point

Join two Bezier curves eachdefined by four control points!

What continuity can we expectin the joint point?

Småuppgift 9Beskriv med ord (åtminstone tre meningar) ochen figur hur man kan sätta ihop en Bezier-kurvaoch en Hermitte-kurva med så bra kontinuitetman normalt kan få.

Deadline att skicka till [email protected] sompdf eller word-dokument: 060502Namnge dokumentet så att det innehåller dittnamn, typ vonAnka-uppg9.doc

Värde: 2p

The cubic B-spline curve

We would like to have C2 continuity

p(u) =( 1- u )3 p0 + (4 - 6u2 + 3u3) p1 +(1 + 3u + 3u2 - 3u3) p2 + u3 p3

Intervals with many contributingcontrol points

Each control point contributes to four intervals

Curves, splinesUniform, nonrational B-splines

To get C0, C1 and also C2 continuity you can use spline curves.The word spline has it´s origin from a kind of ruler used byengineersYou combine a set of curves:

Control points

Curves

Knots

P1 P2 P3 P4 P5 Pm-1 Pm

Q3 Q4 Q5 Qm

t3 t4 t5 t6 tm tm+1

P0

Curves, splinesNonuniform, nonrational B-splines means that the distancesbetween the knots not necessarily are equal.The reason for using this is that you want to control continuity.

Multiple points does not solve the problem:

P0 P4

P1 = P2 = P3

Q3 Q4

Page 4: DGI - 0604263 Bezier, joint point Join two Bezier curves each defined by four control points! What continuity can we expect in the joint point? Småuppgift 9 Beskriv med ord (åtminstone

4

Curves, splinesIt is better to use multiple knots.

Example of a sequence of knots:(0,0,0,1,2,2,3,4,5,5,5,5,)

ti = ti+1 implies Qi is a point

The blending functions aremore complicated and are defined recursively

P0P4

t4 = t5 = t6

Q3Q6

P3

Q7

Curves, splinesNURBS - NonUniform Rational B-Splines

x(t) = X(t)/W(t) y(t) = Y(t)/W(t) z(t) = Z(t)/W(t)

Q(t) = (X(t), Y(t), Z(t), W(t) )

To be used as homogeneous coordinates, which means thatonly control points has to be 3D-transformed

Surfaces

Surface are defined using two parameters.They will consist of two sets of curves in a network in 3D

x = x(u,v)y = y(u,v) z = z(u,v)

0 ≤ u ≤ umax, 0 ≤ v ≤ vmax

Bezier patch

Spline patch

Recursive subdivision of Bezier curves Subdivision surfaces

http://www.multires.caltech.edu/teaching/courses/subdivision/

Page 5: DGI - 0604263 Bezier, joint point Join two Bezier curves each defined by four control points! What continuity can we expect in the joint point? Småuppgift 9 Beskriv med ord (åtminstone

5