Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer...

52
SDAL @ Advanced Ship Design Automation Lab. http://asdal.snu.ac.kr Seoul National Univ. 2009 Fall, Computer Aided Ship Design Part2. Hull Form Modeling Naval Architecture & Ocean Engineering SDAL @ Advanced Ship Design Automation Lab. http://asdal.snu.ac.kr Seoul National Univ. 2009 Fall, Computer Aided Ship Design Part2. Hull Form Modeling Computer Aided Ship design -Part II. Hull Form Modeling- September, 2009 Prof. Kyu-Yeul Lee Department of Naval Architecture and Ocean Engineering, Seoul National University of College of Engineering 학부3학년 교과목“전산선박설계(Computer Aided ship design)”강의 교재

Transcript of Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer...

Page 1: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Computer Aided Ship design

-Part II. Hull Form Modeling-

September, 2009

Prof. Kyu-Yeul Lee

Department of Naval Architecture and Ocean Engineering,Seoul National University of College of Engineering

학부3학년 교과목“전산선박설계(Computer Aided ship design)”강의 교재

Page 2: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Ch 3. 곡면(Surfaces)

3.1 Parametric Surfaces

3.2 Bezier Surfaces

3.3 B-spline surfaces

- Chap3. Surface

Page 3: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.1 Parametric Surfaces

- Chap3. Surface

Page 4: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.1 Parametric Surfaces

곡면

양함수

음함수

매개

변수

222 yxdz

2222 dzyx

sin

cossin

coscos

dz

dy

dx

)),(),,(),,(( zyxrr

구를 2개의 매개변수 로 표현하면 간단히 수식화 할 수 있다.

),(

- Chap3. Surface

4/52

Page 5: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2 Bezier surfaces

3.2.1 Generation of Bezier surfaces by de Casteljau algorithm

- Chap3. Surface

Page 6: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2.1 Generation of Bezier surfaces

by de Casteljau algorithm

3.2.1.1 Bi-linear Bezier Surface Patch

3.2.1.2 Bi-quadratic Bezier Surface Patch

3.2.1.3 Bi-Cubic Bezier Surface Patch

- Chap3. Surface

Page 7: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2.1.1 Bi-linear Bezier Surface Patch- Given: 2x2 Bezier control point- Find: Points on bi-linear Bezier Surface Patch

00b

10b

11b

10b

u

v

uP

uq

u

u1

v

v1

u

v

0 1

1

u

v

u)1( u 00b 01bu

P

u)1( u 10b 11bu

q

v)1( v ),( vur u

P uq

.

)(

1 0 ,

1100

있다수얻을곡면을하는꼭지점으로

을점계산하면를

증가하며까지에서를

1010 b,b,b,br u,v

vu

2x2개의 Bezier 조정점을 이용하여 Bi-linear Interpolation 으로 곡면식을 구할 수 있다.

v

)1( v),( vur u)1( u 10b

11b

)1( u u00b 01b)1( v

v

11

00

10

10

bb

bb

u

u)1( vv)1( ),( vur

u

u1

방법: u, v 방향으로 ‘de Casteljau algorithm’ 사용

- Chap3. Surface7/52

Page 8: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2.1.2 Bi-quadratic Bezier Surface Patch- Given: 3x3 Bezier control point- Find: Points on bi-quadratic Bezier Surface Patch

u

v

방법: u, v 방향으로 ‘de Casteljau algorithm’ 사용

02b

12b

22bu

1 u u

1 uu 1 u

2

up 2

uq

2

ur

01b

11b

21bu

1 u u

1 uu 1 u

1

up 1

uq

1

ur

00b

10b

20bu

1 u u

1 uu 1 u

0

up 0

uq

0

ur

00 10

10 2

0

0 0

1

1

u

u

u u

u u

p

q

b b

b b

01 11

11 2

1

1 1

1

1

u

u

u u

u u

p

q

b b

b b

02 12

12 2

2

2 2

1

1

u

u

u u

u u

p

q

b b

b b

00 01 uu uu u p qr

2 2

00 10 20

2 2

01 11 21

2 2

02 12 22

0

1

2

1 2 1

1 2 1

1 2 1

u

u

u

u u u u

u u u u

u u u u

r

r

b b b

b b

b b br

b

2

00 10 20

01 11 21

2

02 12 22

0

1

2

1

2 1

u

u

u

u

u u

u

r

r

b b

b

r

b

b b

b b b

11 11 uu uu u p qr

22 21 uu uu u p qr

- Chap3. Surface

8/52

Page 9: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2.1.2 Bi-quadratic Bezier Surface Patch- Given: 3x3 Bezier control point- Find: Points on bi-quadratic Bezier Surface Patch

u

v

방법: u, v 방향으로 ‘de Casteljau algorithm’ 사용

02b

12b

22b2

ur

01b

11b

21b1

ur

00b

10b

20b0

ur

2

00 10 20

01 11 21

2

02 12 22

0

1

2

1

2 1

u

u

u

u

u u

u

r

r

b b

b

r

b

b b

b b b

1

vs

0

vs

v

1 v

v

1 v

,u vrv

1 v

0 1

1 2

0

1

1

1

u uv

v u u

v v

v v

s

s

r r

r r

0 1, 1 v vu v v v s sr

2

2

2

0 11 2 1, u u uv v v vu v r rr r

2 2

0

1

2

1 2, 1

u

u

u

v v vv vu

r

r

r

r

2

00 10 202 2

01 11 21

2

02 12 22

1

1 2 1 2 1,

u

v v v v u uu v

u

b b b

b b b

b b

r

b

3x3개의 조정점을 이용하여Bi-Quadratic Bezier Patch를 구할 수 있다.

- Chap3. Surface

9/52

Page 10: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2.1.3 Bi-cubic Bezier Surface Patch- Given: 4x4 Bezier control point- Find: Points on bi-cubic Bezier Surface Patch

u

u1

u u1

u

u1

uu1 u

u1

u

v

4x4개의 조정점을 이용하여 Bi-Cubic Bezier Patch를 구할 수있다.

31 0 2 3 0 0

31 1 2 1 3 13 3 3 3 1

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

30 3 1 3 2 3 3 3 3

( )

( )( , ) ( ) ( ) ( ) ( )

( )

( )

B v

B vu v B u B u B u B u

B v

B v

0,0 , ,0 ,

0, ,1 , ,

, , ,2 ,

, , , ,

b b b b

b b b bb

b b b b

b b b b

방법: u, v 방향으로 ‘de Casteljau algorithm’ 사용

10/52

Page 11: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2.1.3 Bi-cubic Bezier Surface Patch- Given: 4x4 Bezier control point- Find: Points on bi-cubic Bezier Surface Patch

u

v

4x4개의 조정점을 이용하여 Bi-Cubic Bezier Patch를 구할 수있다.

31 0 2 3 0 0

31 1 2 1 3 13 3 3 3 1

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

30 3 1 3 2 3 3 3 3

( )

( )( , ) ( ) ( ) ( ) ( )

( )

( )

B v

B vu v B u B u B u B u

B v

B v

0,0 , ,0 ,

0, ,1 , ,

, , ,2 ,

, , , ,

b b b b

b b b bb

b b b b

b b b b

방법: u, v 방향으로 ‘de Casteljau algorithm’ 사용

11/52

Page 12: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.2.2 Generation of Bezier surfaces

by tensor-product approach

3.2.2.1 Tensor-product approach

3.2.2.2 Tensor-product biquadratic Bezier surface

3.2.2.3 Tensor-product bicubic Bezier surface

- Chap3. Surface

Page 13: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.4.1 Tensor product approach (1)

매우 탄력적인 재질의고무 밀대라고 가정

나무판

End moving curve

Directional curve

Moving curve

makes a surface

Start moving curve

13/52

Page 14: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.4.1 Tensor product approach (2)

u

v

r(u) 곡선을 v 방향으로 sweeping

u

v

r(v) 곡선을 u 방향으로 sweeping

moving curve가 일정한 차수의 Bezier curve

이고, moving curve의Bezier control points의

궤적을 나타내는 directional curve도 Bezier

curve일 때, 이러한 방법으로 생성되는 곡면을

“Tensor product Bezier surface” 라고 한다.

* CAGD, Ch14.3, Tensor Product Approach

moving Curve

directional

Curve

directional

Curve

moving Curve

- Chap3. Surface

14/52

Page 15: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

)(1 vb

3.4.2 Tensor-product bi-quadratic Bezier surface (1)- Given: Control Points of bi-quadratic Bezier Surface- Find: Points on bi-quadratic Bezier Surface

10b

00b

20b

u

0v

1v

)(

)(

)(

)(

)(

)(

2

2

2

1

2

0

222120

121110

020100

2

1

0

vB

vB

vB

v

v

v

bbb

bbb

bbb

b

b

b

02b

01b

21b

22b11b

)()()()( 2

220

2

110

2

000 uBuBuBuS bbbb

Given 3x3 Points bij,

Generate start/end moving curves and directional curves in quadratic Bezier form

12b

0u

1u

)()()()( 2

222

2

112

2

002 uBuBuBuE bbbb

)(uSb

)(uEb

)(0 vb

)(2 vb

)()()()( 2

202

2

101

2

0000 vBvBvBv bbbb

)()()()( 2

212

2

111

2

0101 vBvBvBv bbbb

)()()()( 2

222

2

121

2

0202 vBvBvBv bbbb

- Chap3. Surface

15/52

Page 16: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling- Chap3. Surface

3.4.2 Tensor-product bi-quadratic Bezier surface (2)- Given: Control Points of bi-quadratic Bezier Surface- Find: Points on bi-quadratic Bezier Surface

10b

00b

20b

u

0v

1v

02b

01b

21b

22b11b

Given 3x3 Points bij,

Moving curve can be represented in the following form:

12b

0u

1u

)(uSb

)(uEb

)(0 vb

)(1 vb

)(2 vb),( vub )()()()()()(),( 2

22

2

11

2

00 uBvuBvuBvvu bbbb

)(

)(

)(

)()()(

2

1

0

2

2

2

1

2

0

v

v

v

uBuBuB

b

b

b

)(

)(

)(

)(

)(

)(

2

2

2

1

2

0

222120

121110

020100

2

1

0

vB

vB

vB

v

v

v

bbb

bbb

bbb

b

b

b

)(

)(

)(

)()()(),(2

2

2

1

2

0

222120

121110

020100

2

2

2

1

2

0

vB

vB

vB

uBuBuBvu

bbb

bbb

bbb

b

2

0

2

0

22 )()(j i

jiij vBuBb Bezier surface

control points

16/52

Page 17: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.4.2 Tensor-product bi-cubic Bezier surface (1)- Given: Control Points of bi-cubic Bezier Surface- Find: Points on bi-cubic Bezier Surface

10b

00b

30b

u

0v

1v

)(

)(

)(

)(

)(

)(

)(

)(

3

3

3

2

3

1

3

0

33323130

23222120

13121110

03020100

3

2

1

0

vB

vB

vB

vB

v

v

v

v

bbbb

bbbb

bbbb

bbbb

b

b

b

b

03b

01b31b

33b

Given 4x4 Points bij,

Generate start/end moving curves and directional curves in cubic Bezier form

13b

0u

1u

)()()()()( 3

333

3

223

3

113

3

003 uBuBuBuBuE bbbbb

)(uSb

)(uEb

)(0 vb

)(3 vb

)()()()()( 3

303

3

202

3

101

3

0000 vBvBvBvBv bbbbb

)(1 vb)(2 vb02b

23b

20b

32b

)()()()()( 3

330

3

220

3

110

3

000 uBuBuBuBuS bbbbb

)()()()()( 3

313

3

212

3

111

3

0101 vBvBvBvBv bbbbb

)()()()()( 3

323

3

222

3

121

3

0202 vBvBvBvBv bbbbb

)()()()()( 3

333

3

232

3

131

3

0303 vBvBvBvBv bbbbb

- Chap3. Surface

17/52

Page 18: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling- Chap3. Surface

3.4.2 Tensor-product bi-cubic Bezier surface (2)- Given: Control Points of bi-cubic Bezier Surface- Find: Points on bi-cubic Bezier Surface

10b

00b

30b

u

0v

1v

03b

01b31b

33b11b

13b

0u

1u

)(uSb

)(uEb

)(0 vb

)(1 vb

)(3 vb

)(2 vb02b

23b

20b

32b

),( vub

Given 4x4 Points bij,

Moving curve can be represented in the following form:

)()()()()()()()(),( 3

33

3

22

3

11

3

00 uBvuBvuBvuBvvu bbbbb

)(

)(

)(

)(

)()()()(

3

2

1

0

3

3

3

2

3

1

3

0

v

v

v

v

uBuBuBuB

b

b

b

b

)(

)(

)(

)(

)(

)(

)(

)(

3

3

3

2

3

1

3

0

33323130

23222120

13121110

03020100

3

2

1

0

vB

vB

vB

vB

v

v

v

v

bbbb

bbbb

bbbb

bbbb

b

b

b

b

)(

)(

)(

)(

)()()()(),(

3

3

3

2

3

1

3

0

33323130

23222120

13121110

03020100

3

3

3

2

3

1

3

0

vB

vB

vB

vB

uBuBuBuBvu

bbbb

bbbb

bbbb

bbbb

b

3

0

3

0

33 )()(j i

jiij vBuBb

18/52

Page 19: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3 B-spline surfaces

3.3.1 Generation of B-spline surfaces by tensor-product approach

3.3.2 B-spline surface Interpolation

- Chap3. Surface

Page 20: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1 Generation of B-spline surfaces

by tensor-product approach

3.3.1.1 Tensor-product bicubic B-spline surface

3.3.1.2 Programming Guide of Tensor-product bicubic B-spline surface

- Chap3. Surface

Page 21: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1.1 Tensor-product bicubic B-spline surface (1)- Given: Control Points of bicubic B-spline surface- Find: Points on bicubic B-spline surface

Given 5x5 Control Points dij, u-knots, v-knots, u-degree(=3), v-degree(=3),

Generate start/end moving curves and directional curves in cubic B-spline form:

10d

40d

00d20d

30d

00 u 15 u4.04 u

2u1u

3u7u6u

8u

u

14d

44d

04d

24d

34d

00 v

2v1v

3v

15 v

7v6v

8v

4v

03d

02d

01d

)(0 vd

11d

12d

)(1 vd

23d

22d

21d

)(2 vd

33d

32d

31d

)(3 vd

43d

42d

41d )(4 vd

3 3 3 3 3

00 0 01 1 02 2 03 3 04 40 N v N v N v N v N vv d d dd d d

3 3 3 3 3

10 0 11 1 12 2 13 3 14 41 N v N v N v N v N vv d d dd d d

3 3 3 3 3

20 0 21 1 22 2 23 3 24 42 N v N v N v N v N vv d d dd d d

3 3 3 3 3

30 0 31 1 32 2 33 3 34 43 N v N v N v N v N vv d d dd d d

3 3 3 3 3

40 0 41 1 42 2 43 3 44 44 N v N v N v N v N vv d d dd d d

3

00 01 02 03 04 0

3

10 11 12 13 14 1

3

20 21 22 23 24 2

3

30 31 32 33 34 3

3

40 41 42 43 44

0

2

4 4

1

3

N v

N v

N v

N v

N v

v

v

v

v

v

d

d

d

d d d d d

d d d d d

d

d

d

d d d d

d d d d d

d d d d d

- Chap3. Surface

21/52

Page 22: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1.1 Tensor-product bicubic B-spline surface (1)- Given: Control Points of bicubic B-spline surface- Find: Points on bicubic B-spline surface

Given 5x5 Control Points dij, u-knots, v-knots, u-degree(=3), v-degree(=3),

Moving curve can be represented in the following form:

10d

40d

00d20d

30d

00 u 15 u4.04 u

2u1u

3u7u6u

8u

u

14d

44d

04d

24d

34d

00 v

2v1v

3v

15 v

7v6v

8v

4v

03d

02d

01d

)(0 vd

)(1 vd)(2 vd

)(3 vd

43d

42d

41d

)(4 vd

),( vur

)(

)(

)(

)(

)(

)()()()()(),(

3

4

3

3

3

2

3

1

3

0

4443424140

3433323130

2423222120

1413121110

0403020100

3

4

3

3

3

2

3

1

3

0

vN

vN

vN

vN

vN

uNuNuNuNuNvu

ddddd

ddddd

ddddd

ddddd

ddddd

r

5

0

5

0

33 )()(j i

jiij vNuNd

0 1 2

3 3 3 3 3

0 1 2 33 4 4, v v v vN u N u N u N uu N uv v d dr d d d

0

3 3 3 3 3

0 4

1

21 2

3

4

3N u N u N u N u N u

v

v

v

v

v

d

d

d

d

d

3

00 01 02 03 04 0

3

10 11 12 13 14 1

3

20 21 22 23 24 2

3

30 31 32 33 34 3

3

40 41 42 43 44

0

2

4 4

1

3

N v

N v

N v

N v

N v

v

v

v

v

v

d

d

d

d d d d d

d d d d d

d

d

d

d d d d

d d d d d

d d d d d- Chap3. Surface

22/52

Page 23: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1.2 Programming Guide of Tensor-product bicubic B-spline surface - Member Variables of Class

class CBsplineSurface

{

public:

// member variables

int m_nDegree;

double* m_pKnot_U;

int m_nNumOfKnot_U;

double* m_pKnot_V;

int m_nNumOfKnot_V;

Vector** m_pCP;

int m_nNumOfCP_U;

int m_nNumOfCP_V;

// member functions

};

차수

u 방향 Knot와 개수

v 방향 Knot와 개수

Control Point, u, v 방향 개수

10d

40d

00d20d

30d

00 u 15 u4.04 u

2u1u

3u7u6u

8u

u

14d

44d

04d

24d

34d

00 v

2v1v

3v

15 v

7v6v

8v

4v

03d

02d

01d

)(0 vd

)(1 vd)(2 vd

)(3 vd

43d

42d

41d

)(4 vd

),( vur

(3차)

(9개)

(9개)

(u 방향 5개, v 방향 5개)

- Chap3. Surface

23/52

Page 24: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1.2 Programming Guide of Tensor-product bicubic B-spline surface - Member Functions of Class

class CBsplineSurface

{

public:

// member variables

// member functions

void SetKnot(double* pKnot_U, int nNumOfKnot_U, double* pKnot_V, int

nNumOfKnot_V);

double N(int n, int i, double u, int uv);

Vector GetPoint(double u, double v);

};

Knot 설정

10d

40d

00d20d

30d

00 u 15 u4.04 u

2u1u

3u7u6u

8u

u

14d

44d

04d

24d

34d

00 v

2v1v

3v

15 v

7v6v

8v

4v

03d

02d

01d

)(0 vd

)(1 vd)(2 vd

)(3 vd

43d

42d

41d

)(4 vd

),( vur

u 방향 Knot

v 방향 Knot

- Chap3. Surface

24/52

Page 25: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1.2 Programming Guide of Tensor-product bicubic B-spline surface - Member Functions of Class

class CBsplineSurface

{

public:

// member variables

// member functions

void SetKnot(double* pKnot_U, int nNumOfKnot_U, double* pKnot_V, int

nNumOfKnot_V);

double N(int n, int i, double u, int uv);

Vector GetPoint(double u, double v);

};

B-spline Basis Function 계산

10d

40d

00d20d

30d

00 u 15 u4.04 u

2u1u

3u7u6u

8u

u

14d

44d

04d

24d

34d

00 v

2v1v

3v

15 v

7v6v

8v

4v

03d

02d

01d

)(0 vd

)(1 vd)(2 vd

)(3 vd

43d

42d

41d

)(4 vd

),( vur

B-spline Basis Function 계산(Cox-de Boor Recurrence Formula)

)()()( 1

1

1

11

1 uNuu

uuuN

uu

uuuN n

i

ini

nin

i

ini

in

i

else 0

if 1)(

10 ii

i

uuuuN

u, v 방향을 구분하는 flag

- Chap3. Surface

25/52

Page 26: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1.2 Programming Guide of Tensor-product bicubic B-spline surface - Member Functions of Class

class CBsplineSurface

{

public:

// member variables

// member functions

void SetKnot(double* pKnot_U, int nNumOfKnot_U, double* pKnot_V, int

nNumOfKnot_V);

double N(int n, int i, double u, int uv);

Vector GetPoint(double u, double v);

};

Parameter u, v에 대한 곡면 상의 점 계산

10d

40d

00d20d

30d

00 u 15 u4.04 u

2u1u

3u7u6u

8u

u

14d

44d

04d

24d

34d

00 v

2v1v

3v

15 v

7v6v

8v

4v

03d

02d

01d

)(0 vd

)(1 vd)(2 vd

)(3 vd

43d

42d

41d

)(4 vd

),( vur

)(

)(

)(

)(

)(

)()()()()(),(

3

4

3

3

3

2

3

1

3

0

4443424140

3433323130

2423222120

1413121110

0403020100

3

4

3

3

3

2

3

1

3

0

vN

vN

vN

vN

vN

uNuNuNuNuNvu

ddddd

ddddd

ddddd

ddddd

ddddd

r

5

0

5

0

33 )()(j i

jiij vNuNd26/52

Page 27: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.1.2 Programming Guide of Tensor-product bicubic B-spline surface - Member Function Example ‘GetPoint’

Vector CBsplineSurface::GetPoint(double u, double v){// return valueVector r_u_v(0.0, 0.0, 0.0);

// get curvefor (int i=0; i<m_nNumOfCP_U; i++){Vector r_v(0.0, 0.0, 0.0);

for (int j=0; j<m_nNumOfCP_V; j++){r_v = r_v + m_pCP[i][j] * N(m_nDegree, j, v, ID_V);

}

r_u_v = r_u_v + N(m_nDegree, i, u, ID_U) * r_v;}

return r_u_v;}

)(

)(

)(

)(

)(

)()()()()(),(

3

4

3

3

3

2

3

1

3

0

4443424140

3433323130

2423222120

1413121110

0403020100

3

4

3

3

3

2

3

1

3

0

vN

vN

vN

vN

vN

uNuNuNuNuNvu

ddddd

ddddd

ddddd

ddddd

ddddd

r

5

0

5

0

33 )()(j i

jiij vNuNd

Parameter u, v에 대한 곡면 상의 점 계산

)(d)(d)(d)(d)(d)(d 3

404

3

303

3

202

3

101

3

0000 vNvNvNvNvNv

27/52

Page 28: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2 B-spline surfaces

Interpolation

3.3.2.1 bicubic B-spline surface interpolation 개요

3.3.2.2 bicubic B-spline surface interpolation 상세 과정

3.3.2.3 Sequences of Finding knots

3.3.2.4 Knot 간격차이가 주는 영향

3.3.2.5 Example of bicubic B-spline Surface Interpolation

- Chap3. Surface

Page 29: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

p21

p00

p01

p02

p20

p22p10

p12

u

v

3.3.2.1 bicubic B-spline Surface Interpolation (1)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

00 01 02 03 04

10 11 12 13 14

20 21 22 23 24

30 31 32 33 34

40 41 42 43 44

d d d d d

d d d d d

d d d d d

d d d d d

d d d d d

)(

)(

)(

)(

)(

3

4

3

3

3

2

3

1

3

0

vN

vN

vN

vN

vN

)()()()()( 3

4

3

3

3

2

3

1

3

0uNuNuNuNuN),( vur

5x5 개의 조정점을 구하면 곡면을 생성할 수 있다.- Chap3. Surface

29/52

Page 30: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

곡선상의 점(Pi,j)과 접선벡터 (ti,j) 으로부터

중간 조정점(Ci,j)을 구한다.p21

p00

p01

p02

p20

p22p10

p12C01

C02

C03

u

v

00 00

01 00

02 01

03 02

04 02

1 0 0 0 0

3 30 0 0

0 0

3 30 0 0

0 0 0 0 1

s s

E E

C P

C t

C P

C t

C P

p00

p01

p02 t02

t00

3.3.2.1 bicubic B-spline Surface Interpolation (2)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

p10

p11

p12 t12

t01

Bessel end condition으로 접선벡터(ti,j)를 구한다

Bessel end condition:

곡선을 지난는 3점을 2차식으로 보간(interpolation)

한 후, 곡선의 끝점에서의 1차미분값을 구하는 방법

- Chap3. Surface

p20

p21

p22 t22

t20

30/52

Page 31: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

중간 조정점(Ci,j)과 접선 벡터 (ti,j)

으로부터 B-spline조정점(di,j)을 구한다.

3.3.2.1 bicubic B-spline Surface Interpolation (3)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

02 02

12 02

22 12

32 22

42 22

1 0 0 0 0

d C3 30 0 0

d t

d C0 0

d t3 30 0 0

d C

0 0 0 0 1

s s

E E

p21

p00

p01

p02

p20

p22p10

p12C01

C02

C03

u

v

C22

C02

C12

t22

t02

- Chap3. Surface

p00

p10

p20

t00

t20

p02

p12

p22

t24

t04

C11

C01

C21

C23

C13

C03

t01

t03

t21

t23

Bessel end condition으로 접선벡터(ti,j)를 구한다 31/52

Page 32: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.2 bicubic B-spline Surface Interpolation (4)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

p00

p10

p20

p02p12

p22

p01

p21

p11

u

v

4 6

66

3.65.4

Given 곡면이 지나야할 점들의 좌표 점들은 사각형 grid 형태여야 함 (예, 2x2)

1. u 방향 knot를 결정 주어진 점들의 u방향 거리를 계산한다

- Chap3. Surface

32/52

Page 33: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.2 bicubic B-spline Surface Interpolation (5)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

p00

p10

p20

p02p12

p22

p01

p21

p11

u

v

04

10

0 6

12

5.40

9

Given 곡면이 지나야할 점들의 좌표 점들은 사각형 grid 형태여야 함 (예, 2x2)

1. u 방향 knot를 결정 주어진 점들의 u방향 거리를 계산한다 계산한 거리를 각 점별로 누적한다. 이 거리를 곡면의

u방향 knot라고 부른다

4 6

66

3.65.4

- Chap3. Surface

33/52

Page 34: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.2 bicubic B-spline Surface Interpolation (6)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

p00

p10

p20

p02p12

p22

p01

p21

p11

u

v

1

1

1

0.4

0.5

0.6

Given 곡면이 지나야할 점들의 좌표 점들은 사각형 grid 형태여야 함 (예, 2x2)

1. u 방향 knot를 결정 주어진 점들의 u방향 거리를 계산한다 계산한 거리를 각 점별로 누적한다. 이 거리를 곡면의

u방향 knot라고 부른다 마지막 점의 knot값으로 각 점의 knot값을 나누어 정

규화된 knot값을 계산한다

04

10

0 6

12

5.40

9

- Chap3. Surface

34/52

Page 35: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.2 bicubic B-spline Surface Interpolation (7)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

p00

p10

p20

p02p12

p22

p01

p21

p11

u

v

00.5

1

Given 곡면이 지나야할 점들의 좌표 점들은 사각형 grid 형태여야 함 (예, 2x2)

1. u 방향 knot를 결정 주어진 점들의 u방향 거리를 계산한다 계산한 거리를 각 점별로 누적한다. 이 거리를 곡면의

u방향 knot라고 부른다 마지막 점의 knot값으로 각 점의 knot값을 나누어 정

규화된 knot값을 계산한다 정규화된 knot값들을 v방향으로 평균 u방향 knot값

을 계산한다

0

0

0

1

1

10.4

0.5

0.6

- Chap3. Surface

35/52

Page 36: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.2 bicubic B-spline Surface Interpolation (8)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

p00

p10

p20

p02p12

p22

p01

p21

p11

u

v

Given 곡면이 지나야할 점들의 좌표 점들은 사각형 grid 형태여야 함 (예, 2x2)

1. u 방향 knot를 결정 주어진 점들의 u방향 거리를 계산한다 계산한 거리를 각 점별로 누적한다. 이 거리를 곡면의

u방향 knot라고 부른다 마지막 점의 knot값으로 각 점의 knot값을 나누어 정

규화된 knot값을 계산한다 정규화된 knot값들으로 v방향으로 평균 u방향 knot

값을 계산한다

2. u 방향 점들을 보간하는 B-spline 곡선을 계산 최종적인 u방향 knot와 점들을 지나는 B-spline 곡선

과 그 조정점을 계산한다

3. v 방향 knot 간격을 u뱡향과 동일한 방법으로 구함

4. u 방향 B-spline 곡선의 조정점을 보간하는 v방향B-spline 곡선을 계산 u방향 B-spline 곡선의 조점정에 대해서 1번과 같은

방법으로 v방향 knot를 결정한 후, 이를 이용하여 v방향 B-spline 곡선 (보라색점선) 을 생성한다. 이 곡선의 조정점 (빨간점) 이 최종 B-spline 곡면의 조정점이다

00.5

1

- Chap3. Surface

36/52

Page 37: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

p12

00.5

1

3.3.2.2 bicubic B-spline Surface Interpolation (9)- Given: 곡면상의 9개 점과 4 꼭지점에서의 u, v방향의 접선벡터- Find: Control Points of bicubic B-spline Surface

p00

p10

p20

p02

p22

p01

p21

p11

u

v

Given 곡면이 지나야할 점들의 좌표 점들은 사각형 grid 형태여야 함 (예, 2x2)

1. u 방향 knot를 결정 주어진 점들의 u방향 거리를 계산한다 계산한 거리를 각 점별로 누적한다. 이 거리를 곡면의

u방향 knot라고 부른다 마지막 점의 knot값으로 각 점의 knot값을 나누어 정

규화된 knot값을 계산한다 정규화된 knot값들을 v방향으로 평균하여 최종적인 u

방향 knot값을 계산한다

2. u 방향 점들을 보간하는 B-spline 곡선을 계산 최종적인 u방향 knot와 점들을 지나는 B-spline 곡선

과 그 조정점을 계산한다

3. v 방향 knot 간격을 u뱡향과 동일한 방법으로 구함

4. u 방향 B-spline 곡선의 조정점을 보간하는 v방향B-spline 곡선을 계산 u방향 B-spline 곡선의 조점정에 대해서 1번과 같은

방법으로 v방향 knot를 결정한 후, 이를 이용하여 v방향 B-spline 곡선 (보라색점선) 을 생성한다. 이 곡선의 조정점 (빨간점) 이 최종 B-spline 곡면의 조정점이다

- Chap3. Surface

37/52

Page 38: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling- Chap3. Surface

곡선상의 점,접선벡터와 위의 Knot

간격을 이용하여 B-spline 조정점을구할 수 있음

주어진 곡선상의 점들로부터 Chord

Length를 구함

3.3.2.3 Sequences of Finding Knot

B-spline 곡선에서의Knot 간격 예측

)2,....,3,2(,1

21

1

nipp

pp

ii

ii

i

i

즉, 주어진 곡선들의 Knot 간격이 모두 일정해야 함.

주어지는 곡면상의 점이 GRID와 같이 균일하게 주어져야 이상적인 곡면재현 가능

Tensor Product방식으로 정의된spline 곡면에서의 Knot 간격예측

38/52

Page 39: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

점과 점 사이의 knot 간격은 그 점 사이를 지나가는 데 걸리는 시간과 같은 개념이다.

3.3.2.4 Knot 간격 차이가 주는 영향

0 0.5 1.5 6.5

곡선상의 점

Knot 간격

1

2

3

그러므로 knot간격비가 비슷할 수록 곡면의 왜곡이 적다.39/52

Page 40: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

점과 점 사이의 knot 간격은 그 점 사이를 지나가는 데 걸리는 시간과 같은 개념이다.

3.3.2.4 Knot 간격 차이가 주는 영향

0 0.5 1.5 6.5

곡선상의 점

Knot 간격

1

2

3

그러므로 knot간격비가 비슷할 수록 곡면의 왜곡이 적다.40/52

Page 41: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.5 Example of bicubic B-spline Surface Interpolation (1)- Given: Points on Surface- Find: bicubic B-spline Surface (Control Points of bicubic B-spline Surface)

일반 3차원 곡면 형상 예시

41/52

Page 42: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.5 Example of bicubic B-spline Surface Interpolation (2)- Given: Points on Surface- Find: bicubic B-spline Surface (Control Points of bicubic B-spline Surface)

선박 선형 곡면 예시

42/52

Page 43: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.5 Sample code of bicubic B-spline Surface Interpolation (1)

void BicubicBsplineSurface::Interpolate(Vector **pFittingPoint, int nU, int nV) {

// Generate u-Knot

if(m_UKnot) delete[] m_UKnot;

m_nUKnot = (m_nU - 2) + 2*(3+1);

m_UKnot = new double [m_nUKnot];

// Initial u-Knot

double** tmpUKnots;

tmpUKnots = new double*[nV];

for(int j = 0; j < nV; j++){

tmpUKnots[j] = new double[nU];

for(int i = 0; i < nU; i++){

tmpUKnot[j][i] = …; // chord length or centripetal

}

}

// generate average u-Knot

for(int i = 0; i < nU; i++){

m_UKnot[i] = 0;

for(int j=0; j<nV; j++) { m_UKnot[i] += tmpUKnot[j][i]; }

m_UKnot[i] = m_UKnot[i] / nV;

}

Chord length를 이용하여u, v 방향 Knot 생성

Knot간 간격의 평균값으로Knot 재 설정

43/52

Page 44: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.5 Sample code of bicubic B-spline Surface Interpolation (2)

// Interpolate u-directional B-spline curve

CubicBsplineCurve* u_curve = new CubicBsplineCurve[nV];

for(int j = 0; j < nV; j++){

u_curve[j].SetKnot( m_UKnot );

u_curve[j].Interpolate( pFittingPoint[j], nU );

}

// Generate v-directional Fitting Point

int nvFittingPoint = u_curve[0].m_nControlPoint;

Vector** vFittingPoint = new Vector [ nvFittingPoint ];

for(int j=0; j < nvFittingPoint; j++){

vFittingPoint[j] = new Vector[ nV ];

for( int i = 0; i < nV; i++){

vFittingPoint[j][i] = u_curve[i].m_ControlPoint[j];

}

}

……………………..

p00

p10

p20

p02p12

p22

p01

p21

p11

u

v

00.5

1

u 방향 B-spline curve 생성

44/52

Page 45: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

3.3.2.5 Sample code of bicubic B-spline Surface Interpolation (2)

// Interpolate u-directional B-spline curve

CubicBsplineCurve* u_curve = new CubicBsplineCurve[nV];

for(int j = 0; j < nV; j++){

u_curve[j].SetKnot( m_UKnot );

u_curve[j].Interpolate( pFittingPoint[j], nU );

}

// Generate v-directional Fitting Point

int nvFittingPoint = u_curve[0].m_nControlPoint;

Vector** vFittingPoint = new Vector [ nvFittingPoint ];

for(int j=0; j < nvFittingPoint; j++){

vFittingPoint[j] = new Vector[ nV ];

for( int i = 0; i < nV; i++){

vFittingPoint[j][i] = u_curve[i].m_ControlPoint[j];

}

}

……………………..

p12

00.5

1

p00

p10

p20

p02

p22

p01

p21

p11

u

v

u 방향 B-spline curve 의 조정점을Fitting Point로 하여v 방향 B-spline Curve 생성

45/52

Page 46: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Naval A

rch

itectu

re &

Ocean

En

gin

eerin

g

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

Ch 4. Term Project

Generation Ship hull surfaces by interpolating given points

- Given: Pi,j- Find : di,j

- Chap4. Term Project

Page 47: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

4.1 단일 B-spline 곡면 patch를 이용한 선형곡면 생성 프로그램 구현

- Chap4. Term Project

47/52

Page 48: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

4.2 간단한 요트 형상의 선수부 곡선그물망 형상

* 출처 : 서울대 조선해양공학과 2005년 2학년 교과목『 조선해양공학계획』강좌 중에 학생들이 설계한 선형

사각형 패치의 꼭지점 결정

- Chap4. Term Project

48/52

Page 49: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

4.3 요트 형상의 곡선그물망으로부터 선형곡면 생성결과 (1)

Offset table 형식으로 점을 추출한 후,

이 점들로 부터 bicubic B-spline 선형곡면을 생성한 결과

정보 부족으로 인한 형상왜곡문제가 있음

6x14 points

- Chap4. Term Project

49/52

Page 50: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

4.3 요트 형상의 곡선그물망으로부터 선형곡면 생성결과 (2)

점들의 x좌표 사이의 거리가 일정하도록 점을 추출한 후,

이 점들로부터 bicubic B-spline 선형곡면을 생성한 결과

11x11 points

50/52

Page 51: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

4.4 구상선수를 갖는 단축선의 선수부 곡선그물망 형상

선수부

- Chap4. Term Project

51/52

Page 52: Computer Aided Ship design -Part II. Hull Form Modeling- · 2018. 1. 30. · 2009 Fall, Computer Aided Ship Design –Part2. Hull Form Modeling Computer Aided Ship design-Part II.

SDAL@Advanced Ship Design Automation Lab.http://asdal.snu.ac.kr

Seoul NationalUniv.

2009 Fall, Computer Aided Ship Design – Part2. Hull Form Modeling

4.5 구상선수부 곡선그물망으로부터 선수부 선형곡면 생성결과

주어진 곡선그물망 이외의 보조선을 생성하여 곡선 보간에 적합한

점 data를 생성한 후, 점 data로부터 선수부 선형곡면을 생성한 결과

왜곡 감소

- Chap4. Term Project

52/52