• Tidak ada hasil yang ditemukan

PDF Representation and manipulation of curves - Seoul National University

N/A
N/A
Protected

Academic year: 2024

Membagikan "PDF Representation and manipulation of curves - Seoul National University"

Copied!
28
0
0

Teks penuh

(1)

Representation and manipulation of curves

Human Centered CAD Lab.

(2)

B-Rep Structure – review

Body Face Edge

Vertex Vertex

List of faces List of edges End vertices

< Topology >

< Geometry >

Surface Eqn.

Curve Eqn.

X,Y,Z Position

Geometry vs. Topology

(3)

Types of curve equations

Parametric equation

x=x(t), y=y(t), z=z(t)

Ex) x=Rcos, y=Rsin, z=0 (02)

Implicit nonparametric

F(x, y, z)=0, G(x, y, z)=0

Intersection of two surfaces

Ambiguous independent parameters

Explicit nonparametric

Should choose proper neighboring point during curve generation

,

2 0

2

2 y R

x z 0

2 ,

2 x

R

y z 0

x

z

θ y

(4)

Conic curves

Curves obtained by intersecting a cone with a plane

Circle (circular arc), ellipse, hyperbola, parabola

Ex) Circle (circular arc)

Circle in xy-plane with center (xc, yc) and radius R

x = Rcos + xc

y = Rsin + yc

z = 0

Points on the circle are generated by incrementing  by △θ from 0, points are connected by line segments

Equation of a circle lying on an arbitrary plane can be derived by transformation

(5)

Conic curves – cont’

(6)

Hermite curves

Parametric eq. is preferred in CAD systems

Polynomial form of degree 3 is preferred :

C2 continuity is guaranteed when two curves are connected

Impossible to predict the shape change from change in coefficients⇒ not intuitive

Bad for interactive manipulation

eq.

algebraic :

) 1 0

(

(1)

)]

( ) ( ) ( [ )

(

0 1 2 2 3 3

u

u u

u u

z u v u x

u a a a a

P

(7)

Hermite curves – cont’

Apply Boundary conditions to replace algebraic coefficients

Use ⇒ Substitute in Eq(1)

(1) (0)

(1)

(0)

, P , P , P

P  

1 0

1

0 , P , P , P

P  

3 2

1 1

(1)

1 0

(0)

3 2

1 0

1 (1)

0 0

(0)

a a

a P

P

a P

P

a a

a a

P P

a P

P

3 2 

 

 

 

 

(2)

(8)

Hermite curves – cont’

Solve for in Eq (2)

3 2

1

0

, a , a , a a

1 0

1 0

1 0

0

P - P P

- P a

P P

P P

- a

P a

P a

 

 

 

2 2

- 2

- 3

3

3

0 1

0 2

0

1 (3)

(9)

Hermite curves – cont’

Substitute (3) into (1)

It is possible to predict the curve shape change from the change in P0, P1, P0, P1 to some extent

 

equation curve

Hermite

u u

u 2u

u 2u

3u 2u

3u 1

(u)

tt coefficien geometric 1 0 1 0

3 2

3 2

3 2

3 2

P P P P P

(10)

Hermite curves – cont’

Effect of P0’ and P1’ on curve shape

(11)

Hermite curves – cont’

determine the curve shape by blending the effects of P0, P1, P0, P1→ blending function

3 2

3 2

3 2

3

2

2 , 3 2 , 2 ,

3

1  u  u u  u u  u  u  u  u

(12)

Bezier curves

It is difficult to realize a curve in one’s mind by changing size and direction of P0, P1 in Hermite curves

Bezier curves

Invented by Bezier at Renault

Use polygon that enclose a curve approximately

Control polygon, control point

(13)

Bezier curves – cont’

Passes through 1st and last vertex of control polygon

Tangent vector at the starting point is in the direction of 1st segment of control polygon

Tangent vector at the ending point is in the direction of the last segment

Useful feature for smooth connection of two Bezier curves

The n-th derivative at starting or ending point is

determined by the first or last (n+1) vertices of control polygon

Bezier curve resides completely inside its convex hull

Useful property for efficient calculation of intersection points

(14)

Bezier curves – cont’

(15)

Bezier curves – cont’

1) u

(0 u)

(1 i u

(u) n n i n i i

0

i

P

P

1

u P(u)

)

1 ( )

( P0 P1

P u u u

1 )

1 ( 2 )

1 (

)

1 ( 2 )

1 ( ) (

2 2

2 2 1

0 2

u u u u

u u

u u

u P P P

P

Control Point

: Straight line from P0 to P1 satisfies the desired qualities including convex hull property

satisfies the desired qualities

(16)

Bezier curves – cont’

Highest term is for the curve defined by (n+1) control points

Polynomial of degree n

Degree of curve is determined by number of control points

Large number of control points are needed to represent a curve of complex shape → high degree is necessary.

Heavy computation, oscillation

Better to connect multiple Bezier curves

Global modification property (not local modification)

Difficult to result a curve of desired shape by modifying portions

u

n
(17)

Blending functions in Bezier curve

for degree 3

(18)

Bezier curves – cont’

Bezier Curve does NOT have local modification property

(19)

Derivative vectors

1 ,

, 1 , 0 )

1 1 (

) (

1 1 1

0

n i

where

t i t

n n dt

t d

i i

i

i i n n i

i

Ρ Ρ

a r a

i n

j

i n i

n

i j

j n j

n

i

i i

n i

i i n i

n

i n

i

n

i

i i

n i

i i n i

t i t

i n n t

j t j n

dt t d

i j let

t i t

i n n t

i t i n

t i t

i n n t

i t i n dt

t d pf

Ρ Ρ

Ρ Ρ

Ρ Ρ

r r

 

 

























1

0

1 1

0 1

1 1

0

1 1

1

0 0

1 1

) 1 ( )

( )

1 1 (

) 1 ) (

(

1

) 1 ( )

( )

1 (

) 1 ( )

( )

1 ) (

( )

(20)

Derivatives at the starting and the ending points

Derivative vectors – cont’

) ( )

1 1 (

) (

1 )!

1 (

!

)!

1 (

)!

(

!

! ) ) (

(

1 )!

1 (

!

)!

1 (

)!

1 (

)!

1 (

! ) 1 (

1 j 1) n (j

1 1

0

a t

i t n n

dt t d

i n n

i n i

n n i

n i

n i n i

i n n

j n n

j n j

n n j

n j

n j

i i n i

n

i

r a





 





 









 





) (

) 1 (

) (

) 0 (

1 0 1

n

n n

n

Ρ Ρ

r

Ρ Ρ

r

(21)

Derivative vectors – cont’

Control polygon determines tangent vectors at the ends

Differentiating (a) in the same way gives

) 2 ,

, 0 (

) 1 2 (

) 1 ) (

(

1 2

0

2 2

2

 

n i

where

t i t

n n dt n

t d

i i

i

n

i i

i n i

a a

b r b

(22)

Elevation of a degree

Conversion of Bezier curve of degree n into degree (n+1), i.e. derivation of (n+1) control points into (n+2) control points

 

) ( ) 1 ( ) ( )

(

, , )

1 ( )

(

0

1 0

t t t

t t

Express

t i t

t n

n

i

n i

i n i

r r

r

Ρ Ρ

Ρ Ρ

r





(23)

Elevation of a degree – cont’

) ( )

1 ( )

(

)!

(

!

! )!

( )!

1 (

)!

1 (

1 1

) 1 1 (

) 1 (

1 ,

1

) 1 ( )

(

0

1 1

1 0

1

m a t k

k t t m

t

k m m

k k

m k

m m

k k

m k

m k

m

t k t

t m t

m n

k i

let

t i t

t n t

m

k

k k

m k

m

k

k k m k

n

i

i i n i





















Ρ r

Ρ r

Ρ r

(24)

Elevation of a degree – cont’

) ( )

1 (

) 1 ( )

( ) 1 (

)!

(

!

! )!

1 (

!

)!

1 1 (

) 1 1 (

) ( ) 1 (

1 ,

) 1 ( )

( ) 1 (

0 1

0 1

0 0

1

m b k t m

k t m

m k t m

k t t m

t

k m m

k m k

m k

m m

k m k

m k

m k

m

t k t

t m t

n m i

k let

t i t

t n t

k m

k

k m k

k m

k

k m k

m

k

k k m k

n

i

i i

n i

Ρ Ρ r

Ρ r

Ρ r

























(25)

Elevation of a degree – cont’

Control points of the Bezier curve of degree (n+1) can be derived from (c) as below

n n

n

n n n

n n

nΡ Ρ Ρ Ρ Ρ Ρ

Ρ Ρ ,

, 1 1 ,

) 1 (

, 2

, 0 1 1 1 2 1

0

) 1 (

) 1

) ( 1 1 (

) ( ) 1 ( ) (

) (

&

) (

1

0

1 1

n c

k n

t k k t

t n t

t t

b a

From

n

k

k k k

n

k





 

Ρ Ρ

r r

(26)

de Casteljau algorithm

Bezier Cubic

For

r n i

n r

t t

u B

u

i i

r i r

i r

i

n i

n n

i i

Ρ Ρ

Ρ Ρ

Ρ Ρ

r

, , 0

, , 1 ) 1

(

below.

calculated as

is ) ( )

(

0

1 1 1

0 0 ,

The Value of curve at t of Bezier Curve

(27)

de Casteljau algorithm – cont’

3 )

1 (

2 )

1 (

1 )

1 (

2 1 2

3

1 1 1

2

1 1

r t

t

r t

t

r t

t

i i

i

i i

i

i i

i

Ρ Ρ

Ρ

Ρ Ρ

Ρ

Ρ Ρ

Ρ

(28)

de Casteljau algorithm – cont’

Referensi

Dokumen terkait