• No results found

- Models: - Classical: : Mastermodel (clay( Curves. - Example: - Independent variable t

N/A
N/A
Protected

Academic year: 2021

Share "- Models: - Classical: : Mastermodel (clay( Curves. - Example: - Independent variable t"

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

computer graphics & visualization

computer graphics & visualization

Computer Graphics

Computer Graphics

Geometric Modeling

Geometric Modeling

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Introduction

Introduction

--

Geometric

Geometric

Modeling

Modeling

(GM)

(GM)

since

since

end of 1960

end of 1960

--

Computer

Computer

assistance

assistance

for

for

--

Design: CAD

Design: CAD

--

Manufacturing

Manufacturing

: CAM

: CAM

--

Models:

Models:

--

Classical

Classical

: Mastermodel (

: Mastermodel (

clay

clay

,

,

prototypes

prototypes

, Mock

, Mock

-

-

up)

up)

--

GM:

GM:

mathematical

mathematical

description

description

for

for

object

object

representation

representation

--

Typical

Typical

application

application

areas

areas

:

:

--

Car

Car

-

-

and plane

and plane

design

design

,

,

engineering

engineering

--

Entertainment

Entertainment

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Introduction

Introduction

Modeling

Modeling

of

of

curves

curves

and

and

surfaces

surfaces

--

Computer Aided

Computer Aided

Geometric

Geometric

Design

Design

--

Parametric

Parametric

description

description

Solid

Solid

modeling

modeling

--

Constructive

Constructive

Solid

Solid

Geometry

Geometry

(CSG)

(CSG)

--

Logical

Logical

operations

operations

on

on

base

base

solids

solids

Geometric Modeling

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Curves

Curves

--

Curve

Curve

is

is

a

a

set

set

of

of

points

points

--

Often

Often

given

given

by

by

parametric

parametric

representation

representation

--

Example

Example

:

:

--

Independent variable

Independent variable

t

t

--

Physical

Physical

model

model

: time

: time

t

t

,

,

movement

movement

of

of

particle

particle

]

2

,

0

[

),

cos(

)

(

)

(

),

sin(

)

(

)

(

π

=

=

=

=

t

t

t

f

t

y

t

t

f

t

x

y x d

R

R

b

a

t

t

=

(

)

|

[

,

]}

,

:

{

p

h

h

Polynomial

Polynomial

curves

curves

,

,

monom

monom

basis

basis

--

Parametric

Parametric

curves

curves

desribed

desribed

by

by

polynoms

polynoms

and

and

rational

rational

functions

functions

--

Commonly

Commonly

defined

defined

over

over

segments

segments

--

Low

Low

degree

degree

--

Polynoms of

Polynoms of

degree

degree

n

n

:

:

--

Efficient

Efficient

evaluation

evaluation

(

(

Horner

Horner

-

-

Scheme

Scheme

):

):

i n i i

t

c

t

p

=

=

0

)

(

0

1

2

1

)

)

...

)

(...((

)

(

t

c

t

c

t

c

t

c

t

c

p

=

n

+

n

+

n

+

+

+

Polynomial

Polynomial

curves

curves

,

,

monom

monom

basis

basis

--

Monom

Monom

-

-

Basis for

Basis for

P

P

nn

: {

: {

t

t

ii

|

|

i

i

=0

=0

n

n

}

}

(Taylor

(Taylor

-

-

Basis)

Basis)

--

Simple

Simple

polynoms

polynoms

:

:

--

Linear:

Linear:

p

p

(

(

t

t

) =

) =

c

c

11

t

t

+

+

c

c

00

--

Quadratic

Quadratic

:

:

p

p

(

(

t

t

) =

) =

c

c

22

t

t

22

+

+

c

c

11

t

t

+

+

c

c

00

--

Cubic

Cubic

:

:

p

p

(

(

t

t

) =

) =

c

c

33

t

t

33

+

+

c

c

22

t

t

22

+

+

c

c

11

t

t

+

+

c

c

00 Line through 2 points Parabola through 3 points through 4 points
(2)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Interpolation

Interpolation

--

Motivation:

Motivation:

estimate

estimate

values

values

between

between

known

known

values

values

(

(

control

control

points

points

)

)

--

Often

Often

polynomial

polynomial

interpolation

interpolation

--

Interpolation of

Interpolation of

function

function

values

values

:

:

--

Given

Given

:

:

n

n

+1

+1

pairs

pairs

(

(

t

t

ii

,

,

f

f

ii

)

)

--

Search

Search

: Polynom

: Polynom

p(t

p(t

) of

) of

degree

degree

n

n

with

with

p(t

p(t

ii)

)

=

=

f

f

ii

for all

for all

control

control

points

points

--

This

This

polynom

polynom

is

is

uniquely

uniquely

defined

defined

t1 t2 t3 t4 f1 f2 t0 f0 Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Interpolation

Interpolation

--

Curve

Curve

interpolation

interpolation

:

:

--

Given

Given

:

:

n

n

+1

+1

points

points

a

a

ii

--

Search

Search

:

:

polynomial

polynomial

curve

curve

of

of

degree

degree

n:

n:

p

p

(t

(t

ii

)

)

=

=

a

a

ii

--

Knot

Knot

vector

vector

(

(

t

t

00

,

,

t

t

11

,

,

t

t

22

, ...

, ...

t

t

nn

)

)

--

Reparametrization

Reparametrization

results

results

in different

in different

curve

curve

a0

a1

a2

a3

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Monom

Monom

interpolation

interpolation

--

Approach:

Approach:

Monom

Monom

-

-

Basis: {

Basis: {

t

t

ii

|

|

i

i

=0

=0

n

n

}

}

--

From

From

p

p

(t

(t

ii

)

)

=

=

a

a

ii

the

the

system

system

of

of

equations

equations

is

is

derived

derived

:

:

Vandermond

Vandermond

Matrix

Matrix

=

=

n i i i

t

t

0

)

(

c

p

Basis

Control points

⎟⎟

⎜⎜

=

⎟⎟

⎜⎜

n n n n n n n

t

t

t

t

t

t

c

c

c

a

a

a

M

M

O

M

M

M

M

O

M

M

M

L

M

1 0 2 0 2 0 0 1 0

1

1

3 components per

entry

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Monom

Monom

interpolation

interpolation

--

Disadvantages

Disadvantages

:

:

--

Solving

Solving

the

the

system

system

of

of

equations

equations

is

is

numerically

numerically

complex

complex

--

Not affine invariant

Not affine invariant

--

No intuitive

No intuitive

control

control

,

,

geometric

geometric

interpretation

interpretation

of

of

control

control

points

points

--

Sum

Sum

of

of

points

points

but

but

not

not

vectors

vectors

--

No

No

local

local

control

control

--

Transition

Transition

between

between

segments

segments

only

only

C

C

00

-

-

continuous

continuous

i.g

i.g

.

.

--

Oscillations

Oscillations

2

1

1

)

(

x

x

f

+

=

[

5

,

5

]

x

Monom

Monom

interpolation

interpolation

--

Example

Example

:

:

cubic

cubic

interpolation

interpolation

polynom

polynom

--

Curves

Curves

of

of

lowest

lowest

degree

degree

, wich

, wich

are

are

not

not

planar

planar

in 3D

in 3D

--

Can

Can

be

be

written

written

in

in

matrix

matrix

form:

form:

z z z z y y y y x x x x

d

t

c

t

b

t

a

t

z

d

t

c

t

b

t

a

t

y

d

t

c

t

b

t

a

t

x

+

+

+

=

+

+

+

=

+

+

+

=

2 3 2 3 2 3

)

(

)

(

)

(

( )

t

[

x

( ) ( ) ( )

t

y

t

z

t

]

T

C

Q

=

,

,

=

=

z y x z y x z y x z y x

d

d

d

c

c

c

b

b

b

a

a

a

C

[

3

,

2

,

,

1

]

t

t

t

T

=

Monom

Monom

interpolation

interpolation

--

C can be split into

C can be split into

M (basis matrix)

M (basis matrix)

G (geometry vector)

G (geometry vector)

--

M is fixed for a given interpolation scheme

M is fixed for a given interpolation scheme

--

G depends on the interpolation constraints

G depends on the interpolation constraints

Example

Example

: linear

: linear

interpolation

interpolation

G

M

d

d

d

c

c

c

b

b

b

a

a

a

C

z y x z y x z y x z y x

=

=

(3)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Monom

Monom

interpolation

interpolation

--

Linear interpolation (given endpoints P

Linear interpolation (given endpoints P

11

and P

and P

22

)

)

[ ]

[ ]

T

M

G

P

P

t

b

b

a

a

t

t

Q

y x y x

=

⎡−

=

=

2 1

0

1

1

1

1

1

)

(

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Hermite

Hermite

interpolation

interpolation

--

Goal

Goal

:

:

cubic

cubic

polynomial

polynomial

curve

curve

defined

defined

by

by

2

2

points

points

p(0) and p(1)

p(0) and p(1)

with

with

derivatives

derivatives

--

Approach:

Approach:

--

Solve

Solve

for

for

d

d

i i

and

and

sort

sort

coefficients

coefficients

yields

yields

:

:

with

with

coefficients

coefficients

)

0

(

p

&

p

&

(

1

)

)

0

(

p

&

)

1

(

p

&

p

(0)

p

(1)

2 3 2 1 3 3 2 2 1 0

3

2

)

(

)

(

t

t

t

t

t

t

t

d

d

d

p

d

d

d

d

p

+

+

=

+

+

+

=

&

=

=

3 0 3

)

(

H

)

(

i i i

t

t

c

p

),

1

(

),

1

(

),

0

(

),

0

(

1 2 3 0

p

c

p

c

p

c

p

c

=

=

&

=

&

=

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Hermite interpolation

Hermite interpolation

x H

R

R

P

P

G

x

=

2 1 2 1

[

]

[

]

[

]

[

]

x x x x H H x H H x H H x H H x

G

M

R

x

G

M

R

x

G

M

P

x

G

M

P

x

=

=

=

=

=

=

=

=

0

,

1

,

2

,

3

)

1

(

0

,

1

,

0

,

0

)

0

(

1

,

1

,

1

,

1

)

1

(

1

,

0

,

0

,

0

)

0

(

2 1 2 1 x x H H H x

G

M

G

R

R

P

P

=

=

0

1

2

3

0

1

0

0

1

1

1

1

1

0

0

0

2 1 2 1

( )

t

[

x

( ) ( ) ( )

t

y

t

z

t

]

[

t

t

t

]

M

G

Q

=

,

,

=

3

,

2

,

,

1

)

1

(

)

0

(

),

1

(

),

0

(

,

,

,

2 1 2 1

P

R

R

p

p

p

p

P

=

&

&

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Hermite interpolation

Hermite interpolation

(

) (

) (

) (

)

2 2 3 1 2 3 2 2 3 1 2 3

1

2

3

2

1

3

2

)

(

t

t

t

P

t

t

P

t

t

t

R

t

t

R

Q

=

+

+

+

+

+

+

x x H H H

M

G

G

R

R

P

P

=

=

0

1

2

3

0

1

0

0

1

1

1

1

1

0

0

0

2 1 2 1

=

0

0

0

1

0

1

0

0

1

2

3

3

1

1

2

2

H

M

[

]

[

]

=

=

2 1 2 1 2 3

0

0

0

1

0

1

0

0

1

2

3

3

1

1

2

2

1

,

,

,

)

(

),

(

),

(

)

(

R

R

P

P

t

t

t

t

z

t

y

t

x

t

Q

Hermite

Hermite

interpolation

interpolation

--

Cubic

Cubic

Hermite

Hermite

-

-

Polynoms

Polynoms

:

:

3 0

H

3 3

H

3 1

H

3 2

H

2 3 3 2 3 2 2 3 1 2 3 0

)

2

3

(

)

(

H

)

1

(

)

(

H

)

1

(

)

(

H

)

2

1

(

)

1

(

)

(

H

t

t

t

t

t

t

t

t

t

t

t

t

=

=

=

+

=

Charles Hermite (1822-1901)

Hermite

Hermite

interpolation

interpolation

(4)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Hermite

Hermite

interpolation

interpolation

--

Conversion

Conversion

between

between

Monom

Monom

-

-

and

and

Hermite

Hermite

-

-

basis

basis

:

:

H T H M T M

t

t

t

t

t

t

t

t

G

B

p

p

p

p

G

B

d

d

d

d

p

=

⎟⎟

⎜⎜

=

=

⎟⎟

⎜⎜

=

)

1

(

)

1

(

)

0

(

)

0

(

))

(

H

)

(

H

)

(

H

)

(

(H

)

1

(

)

(

3 3 3 2 3 1 3 0 3 2 1 0 2 3

&

&

Basis vector

Geometry vector

M onom -repres ent at ion Herm it e-repres ent at ion Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Hermite

Hermite

interpolation

interpolation

--

Representation

Representation

of

of

Hermite

Hermite

-

-

Basis

Basis

by

by

Monom

Monom

-

-

Basis

Basis

:

:

--

Conversion

Conversion

to

to

Monom

Monom

basis

basis

in

in

matrix

matrix

form:

form:

--

Conversion

Conversion

by

by

matrix

matrix

is

is

possible

possible

in

in

general

general

also

also

for

for

other

other

types

types

of

of

curves

curves

MH T M T T H

t

t

t

t

t

t

t

t

t

t

t

t

M

B

B

=

⎟⎟

⎜⎜

=

+

+

+

=

0

0

0

1

0

0

1

0

3

1

2

3

2

1

1

2

)

1

(

3

2

2

1

3

2

3 2 2 3 2 3 2 3 2 3 H MH T M

t

B

M

G

p

(

)

=

MH

M

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Hermite

Hermite

interpolation

interpolation

--

Properties

Properties

:

:

--

Neither

Neither

affine invariant

affine invariant

with

with

respect

respect

to

to

control

control

points

points

nor

nor

with

with

respect

respect

to

to

vectors

vectors

--

No

No

local

local

control

control

--

Difficult

Difficult

to find

to find

tangent

tangent

vectors

vectors

--

Curve

Curve

segments

segments

can

can

be

be

attached

attached

continuously

continuously

--

Interpolation

Interpolation

between

between

points

points

with

with

tangents

tangents

,

,

e.g

e.g

. for

. for

Keyframe

Keyframe

-

-

Animation

Animation

with

with

given

given

position

position

and

and

velocity

velocity

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Idea

Idea

:

:

tangent

tangent

vectors

vectors

defined

defined

by

by

first

first

and last

and last

two

two

points

points

:

:

--

b

b

00

and

and

b

b

33

will

will

be

be

interpolated

interpolated

--

b

b

11

and

and

b

b

22

will

will

be

be

approximated

approximated

--

Relation to

Relation to

Hermite

Hermite

-

-

Interpolation

Interpolation

:

:

b

0

b

2

b

1

b

3

(degree)

3

with

)

(

)

1

(

)

(

)

0

(

)

1

(

)

0

(

2 3 0 1 3 0

=

=

=

=

=

n

n

n

b

b

p

b

b

p

b

p

b

p

&

&

cubic Bézier-Curve

B

B

é

é

zier

zier

-

-

Curves

Curves

--

and

and

Hermite

Hermite

-

-

Interpolation

Interpolation

--

And for

And for

the

the

curve

curve

:

:

B HB H

M

G

b

b

b

b

p

p

p

p

G

=

⎟⎟

⎜⎜

⎟⎟

⎜⎜

=

⎟⎟

⎜⎜

=

3 2 1 0

1

0

0

0

3

3

0

0

0

0

3

3

0

0

0

1

)

1

(

)

1

(

)

0

(

)

0

(

&

&

Geometry vector

for Bézier

Matrix for

Bézier to Hermite

B MB T M B HB MH T M H MH T M

t

G

M

B

G

M

M

B

G

M

B

p

=

=

=

)

(

⎟⎟

⎜⎜

=

0

0

0

1

0

0

3

3

0

3

6

3

1

3

3

1

MB

M

with

B

B

é

é

zier

zier

-

-

Curves

Curves

--

The

The

cubic

cubic

B

B

é

é

zier

zier

-

-

Curve

Curve

:

:

--

Bernstein

Bernstein

-

-

Polynoms of

Polynoms of

degree

degree

n

n

:

:

with

with

domain

domain

[0,1]

[0,1]

3

with

)

(

B

)

1

(

3

)

1

(

3

)

1

(

)

(

0 3 3 2 2 1 2 0 3

=

=

+

+

+

=

=

n

t

t

t

t

t

t

t

t

i n i n i

b

b

b

b

b

p

Bézier-Control-Points

Bernstein-Polynoms

i n i n i

t

t

i

n

t

⎟⎟

⎜⎜

=

(

1

)

)

(

B

)!

(

!

!

i

n

i

n

i

n

=

⎟⎟

⎜⎜

with

(5)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Cubic

Cubic

Bernstein

Bernstein

-

-

Polynoms:

Polynoms:

3 0

B

3 3

B

3 1

B

3 2

B

Maximum of is at

B

n

(

t

)

i

n

i

t

=

3 3 3 2 3 2 2 3 1 3 3 0

)

(

B

)

1

(

3

)

(

B

)

1

(

3

)

(

B

)

1

(

)

(

B

t

t

t

t

t

t

t

t

t

t

=

=

=

=

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Of degree

Of degree

n

n

= 1: linear

= 1: linear

interpolation

interpolation

--

Of

Of

degree

degree

n

n

= 2:

= 2:

1 0 1 0 1 1 1 0 1 0

(

)

B

(

)

(

1

)

B

)

(

b

b

b

b

b

p

t

=

t

+

t

=

t

+

t

=

2 2 2 2 1 2 2 0

(

)

(

1

)

,

B

(

)

2

(

1

)

,

B

(

)

B

t

=

t

t

=

t

t

t

=

t

2 0 1 1 1 0 2 1 1 0 2 1 1 0 2 2 1 0 2

)

1

(

)

)

1

((

)

)

1

)((

1

(

)

1

(

)

1

(

)

1

)(

1

(

)

1

(

2

)

1

(

)

(

b

b

b

b

b

b

b

b

b

b

b

b

b

b

p

=

+

=

+

+

+

=

+

+

+

=

+

+

=

t

t

t

t

t

t

t

t

t

t

t

t

t

t

t

t

t

t

t

t

t

iterated linear interpolation

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Iterated

Iterated

linear

linear

interpolation

interpolation

for

for

degree

degree

2:

2:

2 0 1 1 1 0

)

1

(

)

(

b

b

b

p

t

=

t

+

t

=

0

b

1

b

2

b

1 0

b

1 1

b

2 0

b

Example for

t

= 0,4

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Properties

Properties

:

:

--

Partition of

Partition of

unity

unity

(affine invariant)

(affine invariant)

--

Positiveness

Positiveness

--

Symmetry

Symmetry

--

Recursion

Recursion

--

Basis for vector space of polynomials of degree

Basis for vector space of polynomials of degree

n

n

1

)

(

B

0

=

= n i n i

t

0

)

(

B

n

t

i

)

1

(

B

)

(

B

t

n

t

i n n i

=

)

(

B

)

(

B

)

1

(

)

(

B

1 1 1

t

t

t

t

t

n i n i n i − − −

+

=

}

,

,

1

,

0

{

for

0

)

(

B

and

,

1

)

(

B

0 0

n

j

t

t

n j

=

K

=

with

B

B

é

é

zier

zier

-

-

Curves

Curves

-

-

de

de

Casteljau

Casteljau

--

Idea

Idea

:

:

recursion

recursion

/iterative linear

/iterative linear

interpolation

interpolation

--

Given

Given

the

the

B

B

é

é

zier

zier

-

-

Points

Points

(

(

control

control

points

points

)

)

--

Set

Set

the

the

de

de

Casteljau

Casteljau

-

-

Points

Points

:

:

--

Then

Then

,

,

describes

describes

the

the

point on

point on

the

the

curve

curve

that

that

corresponds

corresponds

to

to

parameter

parameter

value

value

t

t

})

,

,

1

,

0

{

|

{

E

d

i

n

i

K

b

i i r i r i r i

t

r

n

i

n

r

t

t

t

t

t

b

b

b

b

b

=

+

=

− + −

)

(

}

,

,

0

{

},

,

,

1

{

,

)

(

)

(

)

1

(

)

(

0 1 1 1

K

K

)

(

0

t

n

b

B

B

é

é

zier

zier

-

-

Curves

Curves

-

-

de

de

Casteljau

Casteljau

--

Applet for

Applet for

Bezier

Bezier

-

-

Curves

Curves

and de

and de

Casteljau

Casteljau

algorithm

(6)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

-

-

de

de

Casteljau

Casteljau

--

Scheme

Scheme

for de

for de

Casteljau

Casteljau

for

for

degree

degree

n

n

= 3:

= 3:

3 2 1 0

b

b

b

b

1 2 1 1 1 0

b

b

b

2 1 2 0

b

b

3 0

b

Bézier-Points

de Casteljau-Points

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

-

-

de

de

Casteljau

Casteljau

--

Relation to Bernstein

Relation to Bernstein

-

-

Polynoms:

Polynoms:

--

The

The

B

B

é

é

zier

zier

-

-

Curve

Curve

in

in

this

this

notation

notation

:

:

--

Points

Points

also represent

also represent

B

B

é

é

zier

zier

-

-

Curves

Curves

--

B

B

é

é

zier

zier

-

-

Curve

Curve

can

can

be

be

constructed

constructed

from

from

de

de

Casteljau

Casteljau

points

points

of order

of order

r

r

or

or

Bernstein

Bernstein

-

-

Polynoms of

Polynoms of

degree

degree

n

n

-

-

r

r

:

:

)

(

t

r i

b

}

,

,

0

{

},

,

,

0

{

,

)

(

B

)

(

0

r

n

i

n

r

t

t

r j r j j i r i

=

= +

K

K

b

b

)

0

,

(

)

(

B

)

(

)

(

0 0

=

=

=

=

=

i

n

r

t

t

t

n j n j j n n

b

b

b

)

(

B

)

(

)

(

0

t

t

t

nr i r n i r i n − − =

=

b

b

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Affine

Affine

Invariance

Invariance

:

:

--

Affine

Affine

mappings

mappings

interchanged

interchanged

with

with

curve

curve

construction

construction

:

:

--

Reason

Reason

:

:

partition

partition

of

of

unity

unity

due

due

to Bernstein

to Bernstein

-

-

Polynoms

Polynoms

--

Reason

Reason

(alternativ): de

(alternativ): de

Casteljau

Casteljau

is

is

affine invariant

affine invariant

)

(

B

)

(

))

(

(

0

t

t

n i n i i n

=

Φ

=

Φ

b

b

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Convex

Convex

-

-

hull

hull

property

property

--

Curve

Curve

remains

remains

in

in

convex

convex

hull

hull

of

of

control

control

polygon

polygon

--

Reason

Reason

: Bernstein

: Bernstein

-

-

Polynoms

Polynoms

are

are

positive

positive

--

Reason

Reason

(alternativ): de

(alternativ): de

Casteljau

Casteljau

generates

generates

convex

convex

combinations

combinations

only

only

--

Simplifies

Simplifies

intersection

intersection

test

test

e.g

e.g

.

.

with

with

rays

rays

(simple

(simple

first

first

test

test

with

with

bounding

bounding

box of

box of

control

control

polygons

polygons

)

)

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Variation

Variation

Diminishing

Diminishing

Property

Property

:

:

--

Arbitrary

Arbitrary

plane in R

plane in R

33

intersects

intersects

curve

curve

not

not

more

more

than

than

it

it

intersects

intersects

the

the

control

control

polygon

polygon

--

Linear

Linear

precision

precision

:

:

--

Equidistant

Equidistant

B

B

é

é

zier

zier

-

-

Points

Points

on a

on a

line

line

yield

yield

(

(

identic

identic

parametrized

parametrized

)

)

line

line

through

through

these

these

points

points

--

No

No

local

local

control

control

pseudo

pseudo

-

-

local

local

control

control

:

:

--

Change of a

Change of a

B

B

é

é

zier

zier

-

-

Points

Points

changes

changes

entire

entire

curve

curve

--

Dominant

Dominant

contribution

contribution

around

around

maximum

maximum

t

t

=

=

i

i

/

/

n

n

of

of

corresponding

corresponding

Bernstein

Bernstein

-

-

Polynom

Polynom

--

Interpolation:

Interpolation:

b

b

00

and

and

b

b

nn

are

are

points

points

on

on

the

the

curve

curve

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Tangent

Tangent

property

property

--

Tangents

Tangents

on

on

curve

curve

:

:

--

Derivatives

Derivatives

of Bernstein

of Bernstein

-

-

Polynoms:

Polynoms:

--

Derivative of

Derivative of

curve

curve

:

:

)

(

)

1

(

,

)

(

)

0

(

=

1

0

=

n

n−1 n n

n

n

b

b

b

b

b

b

&

&

(

B

(

)

B

(

)

)

)

(

B

1 1 1

t

t

n

t

dt

d

n i n i n i − − −

=

(

) (

)

i i i n i n i i n n n n i n i i i n i n i i n

t

n

n

n

t

n

t

dt

d

t

b

b

b

b

b

b

b

b

b

b

b

=

Δ

Δ

=

Δ

=

=

=

=

+ − − = − − − − − = + =

1 1 1 0 1 0 1 0 1 1 1 1 0 1 0

mit

)

(

B

)

(

B

)

(

)

(

B

)

(

&

Tangent vector for curve of degreen - 1

(7)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

--

Examples

Examples

:

:

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

(Subdivision)

(Subdivision)

--

With

With

de

de

Casteljau

Casteljau

a

a

B

B

é

é

zier

zier

-

-

Curve

Curve

can

can

be

be

split

split

into

into

two

two

segments

segments

,

,

which

which

are

are

again

again

in

in

B

B

é

é

zier

zier

-

-

Form

Form

--

New

New

B

B

é

é

zier

zier

-

-

Points

Points

of

of

segments

segments

consist

consist

of

of

upper

upper

and

and

lower

lower

boundary

boundary

of de

of de

Casteljau

Casteljau

-

-

Scheme

Scheme

3 2 1 0 b b b b 1 2 1 1 1 0 b b b 2 1 2 0 b b 3 0 b 0 0

b

2 0

b

1 0

b

3 0

b

b

12 2 1

b

0 3

b

subdivision

of curve

1 1

b

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

(Subdivision)

(Subdivision)

--

Refined

Refined

control

control

polygons

polygons

converge

converge

against

against

B

B

é

é

zier

zier

-

-Curve

Curve

--

Practical

Practical

issues

issues

:

:

--

Split

Split

parameter

parameter

interval

interval

into

into

equal

equal

halfs

halfs

--

Exponential

Exponential

convergence

convergence

--

Efficient

Efficient

scheme

scheme

to

to

represent

represent

curve

curve

by

by

means

means

of

of

piecewise

piecewise

linear

linear

interpolation

interpolation

--

Efficient

Efficient

scheme

scheme

for

for

intersection

intersection

test

test

bounding

bounding

box of

box of

refined

refined

segments

segments

--

Design

Design

-

-

refinement

refinement

by

by

local

local

increase

increase

of

of

number

number

of

of

control

control

points

points

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Curves

Curves

Pros

Pros

&

&

Cons

Cons

--

Pros

Pros

:

:

--

B

B

é

é

zier

zier

-

-

Polygon

Polygon

gives

gives

overview

overview

of

of

approximate

approximate

shape

shape

of

of

curve

curve

--

Intuitive and

Intuitive and

controllable

controllable

change

change

of

of

curve

curve

--

Simple and

Simple and

efficient

efficient

algorithms

algorithms

for

for

representation

representation

and

and

intersection

intersection

of

of

curve

curve

--

Derivative

Derivative

can

can

be

be

computed

computed

--

Cons

Cons

:

:

--

Degree

Degree

of

of

curve

curve

is

is

coupled

coupled

to

to

number

number

of

of

control

control

points

points

,

,

i.e

i.e

. high

. high

polynomial

polynomial

degree

degree

--

No

No

local

local

control

control

:

:

change

change

of

of

one

one

point

point

changes

changes

entire

entire

curve

curve

Spline

Spline

-

-

Curves

Curves

--

Problem so far:

Problem so far:

polynom

polynom

degree

degree

depends

depends

on

on

number

number

of

of

control

control

points

points

--

Idea

Idea

:

:

--

Multiple

Multiple

segments

segments

with

with

low

low

degree

degree

instead

instead

of

of

one

one

segment

segment

of high

of high

degree

degree

--

Important

Important

is

is

smooth

smooth

transition

transition

between

between

segments

segments

--

Spline

Spline

:

:

--

A

A

thin

thin

flexible rod

flexible rod

used

used

for

for

the

the

construction

construction

of

of

ships

ships

--

Deutsch:

Deutsch:

Straklatte

Straklatte

,

,

Strakfunktionen

Strakfunktionen

Spline

Spline

-

-

Curves

Curves

--

Additional

Additional

motivation

motivation

:

:

--

A

A

cubic

cubic

Spline

Spline

describes

describes

the

the

shape

shape

of a

of a

thin

thin

rod

rod

that

that

is

is

fixed

fixed

at start and end point

at start and end point

--

Minimizes

Minimizes

bending

bending

energy

energy

(

κ

is

is

curvature

curvature

of

of

curve

curve

)

)

--

Segments

Segments

can

can

be

be

of

of

arbitrary

arbitrary

type

type

:

:

--

Hermite

Hermite

-

-

Curves

Curves

--

Quadrics

Quadrics

--

B

B

é

é

zier

zier

-

-

Curves

Curves

ds

s

c

E

l

=

0 2

)

(

κ

(8)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

é

é

zier

zier

-

-

Splines

Splines

--

Spline

Spline

-

-

Segments

Segments

i

i

:

:

--

Spline

Spline

s

s

(

(

u

u

) ist

) ist

sum

sum

of

of

segments

segments

=

=

n j j i n j i

t

u

0 ,

)

(

B

)

(

b

s

b

i,3

=

b

i+1,0

u

i

u

i+1

b

i,0

b

i,1

b

i,2

b

i+1,1 Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

B

B

-

-

Splines

Splines

--

Example

Example

:

:

C

C

11

-

-

continuous

continuous

curve

curve

from

from

piecewise

piecewise

quadratic

quadratic

B

B

é

é

zier

zier

-

-

Segments

Segments

--

Inner

Inner

points

points

are

are

redundant

redundant

--

Control

Control

points

points

b

b

00

,

,

b

b

11

,

,

b

b

33

,

,

b

b

55

,

,

b

b

77

,

,

b

b

88

describe

describe

the

the

curve

curve

entirely

entirely

d-1=b0 d0=b1 d1=b3 d2=b5 d3=b7 d4=b8 b2 b4 b6 Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Surfaces

Surfaces

--

Piecewise

Piecewise

polynomials

polynomials

f: R

f: R

22

R

R

33

--

Generalized

Generalized

Bezier

Bezier

curves

curves

--

Tensorproduct

Tensorproduct

patches

patches

--

Triangle

Triangle

patches

patches

(

(

not

not

discussed

discussed

here

here

)

)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Curve

Curve

-

-

valued

valued

curves

curves

--

Bezier

Bezier

curve

curve

:

:

--

Control

Control

points

points

move

move

on

on

curve

curve

i n i n i

t

t

p

(

)

B

(

)

b

0

=

=

ij n i n i m j m j i n i n i

u

v

v

u

v

u

p

(

,

)

B

(

)

b

(

)

B

(

)

B

(

)

b

0 0 0

∑∑

= = =

=

=

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

(9)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

(10)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

Casteljau

Casteljau

Algorithm

Algorithm

--

u

u

-

-

v order: n+1+1

v order: n+1+1

univariate

univariate

Casteljaus

Casteljaus

--

v

v

-

-

u order: m+1+1

u order: m+1+1

univariate

univariate

Casteljaus

Casteljaus

Tensorproduct

Tensorproduct

patches

patches

--

De

De

Casteljau

Casteljau

algorithm

algorithm

--

Direct

Direct

bilinear

bilinear

Tensorproduct

Tensorproduct

patches

patches

--

De

De

Casteljau

Casteljau

algorithm

algorithm

(11)

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics

Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

De

De

Casteljau

Casteljau

algorithm

algorithm

--

Direct

Direct

bilinear

bilinear

Course SS 06

Course SS 06 ––Computer GraphicsComputer Graphics Prof. Dr. R. Westermann

Prof. Dr. R. Westermann ––Computer Graphics and Visualization GroupComputer Graphics and Visualization Group computer graphics & visualizationcomputer graphics & visualization

Tensorproduct

Tensorproduct

patches

patches

--

References

Related documents

‘Proceedings of the 5th annual conference on Computer Graphics and interactive techniques’, ACM Special Interest Group on Computer Graphics and Interactive Techniques, Atlanta

ACM Transaction on Applied Perception, International Journal of Computer Vision, IEEE Transactions on Multimedia, Computer Graphics Forum, Graphical Models, Computer & Graphics,

Keywords: Out-of-core algorithms, scientific visualization, computer graphics, interactive ren- dering, volume rendering, surface simplification..

edge bundling for graph visualization,” Visualization and Computer Graphics, IEEE Transactions on , vol. Auber, “Winding roads: Routing edges

Foundation level courses include General Crafts, Design and Drawing for Production, Basic Video Production, Computer Animation, Acting, Stagecraft, Computer Graphics, Studio Art

Toby Breckon Computer Graphics & VTK  21 Graphical Objects in VTK Toby Breckon Computer Graphics & VTK  22 Example : drawing cone

• Computer graphics and visualization applications use several distinct coordinate systems: model, world, view and display. • Usually they use

 Visual Data Mining: the process of discovering implicit but useful knowledge from large data sets using visualization techniques. Computer