béziersurfaces, patched surfaces, transfinite interpolation (coons patch) ferienakademie im sarntal...

Post on 04-Jan-2016

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Béziersurfaces, patched surfaces, Transfinite Interpolation

(Coons Patch)

Ferienakademie im Sarntal 19.9-1.10.2004

von Michael Ott

CAGD 3: curved surfaces

Motivation

CAGD 3: curved surfaces

Motivation

CAGD 3: curved surfaces

Motivation

CAGD 3: curved surfaces

Motivation

CAGD 3: curved surfaces

Motivation

CAGD 3: curved surfaces

Motivation

CAGD 3: curved surfaces

Content

1. Béziersurfaces

1.1 Bilinear Interpolation

1.2 Tensor product approach

1.3 Derivertives

1.4 Form of a matrix for a Bézier surface

3. Transfinite Interpolation

3.1 „Regel“ surface

3.2 Bilinear tied Coonspatch

2. Patched surfaces

2.1 Smoothness and subdivision

2.2 Estimation of twist vectors

2.3 Interpolatants for tensor products

2.4 Bicubic Hermite-Partsurfaces

4. Summary

CAGD 3: curved surfaces

1. Béziersurfaces

1. Béziersurfaces

1.1 Bilinear Interpolation

1.2 Tensor product approach

1.3 Derivertives

1.4 Form of a matrix for Bézier-surfaces

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Definitions :

- linear Interpolation: determine simplest curve between two points

- bilinear Interpolation: determine simplest surface between four points

Example:

u

vb00

b10

b11b01

u

v

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

A surface with the corner points b00, b01, b10, b11 can be described in the following

way :

1

0

1

1

11 )()(),(i j

jiij vBuBbvux

unit square = domain of x(u,v)

Codomain of x(u,v) = bilinear interpolant

v

u0 u,v 1

(1.1)

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Definition : isoparametric curves

The subdomain of straight lines which are parallel to one axis of the domain

are called isoparametric curves.

Example:

u

vb00

b10

b11b01

u

v

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Edge curves are represented as straight lines that go through two

vertices.

Example:

u

v

X(u,v)

(0,0) (0,1)

b00

b10

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Calculating of surface-points:

The points of the subdomain can be calculated with the formula (1.1). We don‘t do

this, because we use an another two-stage methode to calculate.

Therefore, we calculate two interim points which define a straight line for v=const.

Then we calculate this new straight line to u and we get the point.

1,00,01,00,0 **)1( bvbvb

1,10,11,10,1 **)1( bvbvb

1,10,1

1,00,0 **)1(),( bubuvux

(1.2)

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Example:

You have four points:

1

1

1

,

0

1

0

,

0

0

1

,

0

0

0

b0,0 b0,1 b1,1b1,0

And the parameters v=0.5 u=0.5

5.0

1

5.0

1

1

1

*2

1

0

1

0

*)2

11(1,1

0,1b

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

0

0

5.0

0

0

1

*2

1

0

0

0

*)2

11(1,0

0,0b

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

u

vb00

b10

b11b01

u

v

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

25.0

5.0

5.0

5.0

1

5.0

*2

1

0

0

5.0

*)2

11()5.0,5.0(x

So the point has the coordinates (0.5,0.5.0.25)T in the 3D-surface.

Result:

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

The result as a graphic:

u = 0.5

v = 0.5b00

b10

b11b01

u

v

X(0.5,0.5)

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Here, you can see the result if you calculate a lot of points:

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Calculating of a surface-point with iterated bilinear

interpolation ( de Casteljau for surfaces) :

v

v

bb

bbuub rr

jirrji

rrji

rrjirr

ji

1**]1[ 1,1

1,11,1

,1

1,11,

1,1,,

,

r=1,..,n i,j=1,..,n-r

(1.3)

The bi,j0,0 are the points of the Bézier control polygon.

The resulting point is b0,0n,n

and the controllpolygon of the surface must rectangular. ( 0 i,j n )

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Example:

b00

b20

b02

b22

b1011

b0022

CAGD 3: curved surfaces

1.1 Bilinear Interpolation

Problem with de Casteljau:

When you have control polygons with different

grads in u- and v-direction then you have to

calculate the point further with linear interpolation

from K=min(grad(u),grad(v)). Therefore, you need

a case difference and this is bad to implement.

Thus, we will learn a better method in the next chapter.

b12

b10

b0011

b0012

What is now the tensor product approach ?

The following sentence describes this good:

„A surface is the geometric location of a curve which moves

itself through the space and is changing its form. “

CAGD 3: curved surfaces

1.2 Tensor product approach

At the beginning we have a Bézier curve with the constant grad m.

b0 b3

b2b1

CAGD 3: curved surfaces

1.2 Tensor product approach

b0 b3

b2b1

This Bézier curve is described wirh the following formula that we know from earlier.

m

i

mii

m uBbub0

)()( (Starting Bézier curve (2.1))

CAGD 3: curved surfaces

1.2 Tensor product approach

n

j

njjiii vBbvbb

0, )()( (2.2)

Now we move the control points of this Bézier curve on Bézier curves wich have all the same grad n through the space.

For the control points bi follows the formula:

CAGD 3: curved surfaces

1.2 Tensor product approach

CAGD 3: curved surfaces

1.2 Tensor product approach

Now we insert the formula (2.2) into the formula (2.1) and we get the whole formula (2.3) for a tensor product surface:

m

i

n

j

nj

miji

nm vBuBbvub0 0

,, )()(),( Tensor product surface (2.3)

CAGD 3: curved surfaces

1.2 Tensor product approach

CAGD 3: curved surfaces

1.2 Tensor product approach

1

1

1

,

0

1

0

,

0

0

1

,

0

0

0

b0,0 b0,1 b1,1b1,0

And the parameters v=0.5 u=0.5

Example:

You have four points:

CAGD 3: curved surfaces

1.2 Tensor product approach

We evaluate the row of Bézier points of u=0.5

m

i

mii uBbub

0

)()(

5.0*5.0*

)5.0(*5.0*1

1*

)5.0(*5.0*1

0*)5.0(

10

101

010

bb

b

bb

CAGD 3: curved surfaces

1.2 Tensor product approach

We get the interimpoints:

5.0

5.0

1

,

0

5.0

0

This points describe the isoparametric curve b(0.5,v).

Evaluating for v=0.5 takes:

5.0*5.0*)5.0( 101 bbb

CAGD 3: curved surfaces

1.2 Tensor product approach

25.0

5.0

5.0

25.0

25.0

5.0

0

25.0

0

)5.0(1b

The resulting point is:

We see this point has the same coordinates like the point we calculated

before with the other method. So we recognize that both methods are

equal. We will use later the tensor product approach again to calculate

other surfaces in the space.

CAGD 3: curved surfaces

1.3 Derivertives

We only look for derivertives for the edgecurves of surfaces

An example is / u |u=0.

This derivertive is called „derivertive to the edge“.

n

j

njj

rr

r

vBbrm

mv

u 0,0

0, )()!(

!),0(

From this formula, we can get the information that the derivertive to the edge

from order r only depends on the r+1 rows(cols) of Bézier points

which are closest to the edge.

CAGD 3: curved surfaces

1.4 Form of a matrix for Bézier surface

)(

)(

**)()....(),(0

0

000

0,

uB

vB

bb

bb

uBuBvubnn

n

mnm

nmm

mnm

Matrix-representation of tensor product surfaces :

(4.1)

CAGD 3: curved surfaces

2. Patched surfaces

2. Patched surfaces

2.1 Smoothness and subdivision

2.2 Estimation of twist vectors

2.3 Tensor product of interpolants

2.4 Bicubic Hermite surface parts

CAGD 3: curved surfaces

2.1 Smoothness and subdivision

You have two Bézier surfaces which should be connected.

In the case of a Bézier curve you could connect them if they have the same derivertive in u-direction. That means, you needed Cr constancy.

The case of Bézier surfaces can be reduced to Bézier curves. You have only to check the condition for Bézier curves for every row of Bézier points which are Bézier curves.

CAGD 3: curved surfaces

2.1 Smoothness and subdivision

You have a Bézier surface which you want to divide into two pieces.

In case of a Bézier curve you could divide it if you use the algorithmus from de Casteljau. Here you can do the same.

The case of Bézier surfaces can be reduced to Bézier curves. You only have to use the algorithmen for Bézier curves for every row of Bézier points which are Bézier curves.

CAGD 3: curved surfaces

2.2 Estimation of twist vectors

What are twist vectors ?

Twist vectors are the mixed derivertives of a Bézier surface. We write 2/ u,v for this derivertive.

Twist vectors have a huge importance for the construction of surfaces. They are often needed to make a realistic crossing between different surfaces.

We will now discuss to two different methods to estimate twist vectors.

The „Null-twist vector“ and the „Adinis-twist vector“.

CAGD 3: curved surfaces

2.2 Estimation of twist vectors

null-twist vector:Easiest and first used method, that puts the twist vector to

the Null-twist vector.

This method is only optimal for „Schiebe“-surfaces, because their twist vector disappear.

Disadvantage:

By other surfaces there will be flat positions and the surface

becomes distorted.

Advantage:

By networks of partial surfaces these vectors construct a global C1 constant surface.

Therefore, this is a secure method to construct surfaces.

CAGD 3: curved surfaces

2.2 Estimation of twist vectors

Adinis-twist vector:

With the four edgecurves of the surface we can make a bilinear tied

Coonspatch.

Then we take the edge twist vectors of this surface as the resulting vectors.

CAGD 3: curved surfaces

2.2 Estimation of twist vectors

Adinis-twist vector:

Problem: This method is only perfect, for the case that you have one

surface. When there are networks of surfaces you don‘t have

the garanty, that you get a C1 constant surface.

Solution:

CAGD 3: curved surfaces

2.2 Estimation of twist vectors

Adinis-twist vector:

Solution:We take four partial surfaces, which should be connected and

that build again a Coonspatch with their edgecurves.

Now we choose the point where they meet as the resulting

twist vector. So we get a C1 constant surface.

CAGD 3: curved surfaces

2.2 Estimation of twist vectors

Two different methods to estimate twist vectors and their result:

CAGD 3: curved surfaces

2.3 Tensor product of interpolants

Now we examine a problem which we can often

find in the daily work with surfaces.

Given: A field of (m+1)*(n+1) data points

with xij 0i m, 0 j n

Wanted: A surface interpolating this points

To find this surface we have to solve the system of equation

based on the formula (4.1) for the given points.

This can be written with matrixes:

X = A*C*B

CAGD 3: curved surfaces

2.3 Tensor product of interpolants

This equation can be written as

X = D*B (I)

with D = A*C (II)

M + 1

N + 1

M + 1

N+1 N+1N+1

*X BD

M + 1

M + 1

M + 1

N+1 N+1M+1

*D CA

(I) can be seen as a family of (m+1) interpolation problems which can be solved with the same coefficient matrix B.

Then we get the matrix D.

The second formula can be interpreted as (n+1) inter- polation problems and can be solved in the same way. So we get the coefficient matrix C.

CAGD 3: curved surfaces

2.3 Tensor product of interpolants

Visualisation: (Bicubic Spline-Interpolation)

CAGD 3: curved surfaces

2.4 Bicubic Hermite-Partsurfaces

Hermite-Partsurface

With the tensor product approach we get the following formula for bicubic-Hermite-Partsurfaces :

1,0)()(),(3

0

3

0

33,

vuvHuHhvuxi j

jiji (5.1)

Beside we need the points, the partial derivertives and the mixed derivertives of this surface for the hi,j

CAGD 3: curved surfaces

2.4 Bicubic Hermite-Partsurfaces

)1,1()1,1()0,1()0,1(

)1,1()1,1()0,1()0,1(

)1,0()1,0()0,0()0,0(

)1,0()1,0()0,0()0,0(

,

xxxx

xxxx

xxxx

xxxx

h

vv

uuvuvu

uuvuvu

vv

ji

Dates to one vertex

CAGD 3: curved surfaces

2.4 Bicubic Hermite-Partsurfaces

Hermite-Partsurface

A partsurface (I,J) of a network of Hermite-surfaces is given through

this formula:

1,0)()(),(3

0

3

0

33,

tstHsHhvuxi j

jiji

With s,t as local parameters in the interval [ui,ui+1] and [vj,vj+1] and

the modified matrix hi,j:

)1,1()1,1()0,1()0,1(

)1,1()1,1()0,1()0,1(

)1,0()1,0()0,0()0,0(

)1,0()1,0()0,0()0,0(

,

xxxx

xxxx

xxxx

xxxx

h

vJvJ

uIuvJIuvJIuI

uIuvJIuvJIuI

vJvJ

ji

CAGD 3: curved surfaces

2.4 Bicubic Hermite-Partsurfaces

Hermite-Partsurface

It‘s now easy to recognize that a patched surface is C1 constant, if two neighbouring surfaces have the same values in the two rows (cols) of the coefficient matrix to the common edge.

In this case the two nearest rows (cols) to the edge are equal in the

points, the partial derivertives and in the mixed derivertive which means

constancy.

CAGD 3: curved surfaces

3. Transfinite interpolation (Coonspatch)

3. Transfinite interpolation

3.1 „Regel“ surfaces

3.2 Bilinear tied Coonspatch

CAGD 3: curved surfaces

3.1 „Regel“ surfaces

Defintion: „Regel“ surface

You have two edgecurves c1 and c2 which are defined over

the same parameter interval u[0,1]. Now we want the surface that has the two curves as opposite edgecurves.

This surface is called „Regel“ surfaces.

c1

c2

v

u

CAGD 3: curved surfaces

3.1 „Regel" surfaces

We get: x(u,0)=c1(u)

x(u,1)=c2(u)(3.1)

c1 x(u,0)=c1(u)

c2 x(u,1)=c2(u)

v

u

CAGD 3: curved surfaces

3.1 „Regel" surfaces

With this relations (3.1) we get a formula for the surface:

)(*)(*)1(),( 21 ucvucvvux (3.2)

CAGD 3: curved surfaces

3.1 „Regel" surfaces

Advantages:

you can choose the input curves free

they must be defined on the same interval, but the interval

is free to choose

We have interpolated entire curves now instead of discrete points,

therefore, we call this method transfinite interpolation.

CAGD 3: curved surfaces

3.2 Bilinear tied Coonspatch

Termdefintion:

Two edgecurves at a time are tied together with a rulesurface. Because this happens twice we speak from a

„bilinear tied Coonspatch“.

Solving problem:

We have four edgecurves c1(u), c2(u), d1(v), d2(v) over the

intervall u[0,1], v[0,1]. We search now for an surface x

which has these curves has edges.

We use the concept for „Regel" surfaces from the last chapter to solve this problem now.

CAGD 3: curved surfaces

3.2 Bilinear tied Coonspatch

x(u,0)=c1(u) x(u,1)=c2(u)

x(0,v)=d1(v) x(1,v)=d2(v)

We have the following relations:

Now we use two edgecurves c1 and c2

and connect them to a „Regel“ surface:

rc(u,v)=(1-v)*x(u,0)+v*x(u,1) (3.3)

CAGD 3: curved surfaces

3.2 Bilinear tied Coonspatch

Now we use the two other edgecurves d1 and d2

and connect them to a „Regel“ surface:

rd(u,v)=(1-u)*x(0,v)+u*x(1,v) (3.4)

CAGD 3: curved surfaces

3.2 Bilinear tied Coonspatch

Then we superimpose the two „Regel" surfaces and get a surface rcd.

We have now the problem that the „Regel" surfaces only interpolate their own edgecurves correctly, however, the two others can not immitate because they are linear at this side.

To solve this problem we use the bilinear interpolants from the chapter 1.1 through the four vertices of the surface that corrects this error exactly.

CAGD 3: curved surfaces

3.2 Bilinear tied Coonspatch

Then we get an surface which is described with the following formula:

x = „Regel“ surface u (3.3)+ „Regel“ surface v (3.4)- bilinear interpolant (1.1)

)5.3(1

*)1,1()0,1(

)1,0()0,0(*1

1*)1,()0,(

),1(

),0(*1),(

v

v

xx

xxuu

v

vuxux

vx

vxuuvux

CAGD 3: curved surfaces

3.2 Bilinear tied Coonspatch

As result we get the following patch

CAGD 3: curved surfaces

3.2 Bilinear tied Coonspatch

Tiefunctions

The functions 1-u, u, and 1-v, v are called tiefunctions.

These functions can be changed with any other function and so you can modify the Coonspatch.

They have only the following restrictions:

every pair of functions fi, gi must have the sum 1

f1(0)=g1(0) and f1(1)=g1(1)=0

CAGD 3: curved surfaces

4. Summary

Summary:

the tensor product approach is very important to reduce almost any surface problem to several curve problems

you can solve most surface problems if you reduce them to several curve problems

Cr constancy depends on the r+1 rows (cols) of Bézier points that are nearest to the edge.

two surfaceses with Cr constancy at the same side can be connected

CAGD 3: curved surfaces

top related