# Методическое пособие по курсу ''Интерактивные графические системы''

• Published on
08-Dec-2016

• View
220

8

Embed Size (px)

Transcript

• -

., ... ..

-, 2002

• . .., .., .. , .. , .. , .. : ..., . ..

, 2002

• 1.

1.1. 1.2 1.3. - 1.4

1.4.1. . 1.5 1.6

1.6.1. 1.6.2. 1.6.3 . .

1.7 2.

2.1. 2.2. , 2.3. 2.4.

3. 3.1 3.2 .

3.2.1 . 3.2.2 3.2.3

3.3 . 3.3.1 3.3.2 z- 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7

4. 4.1 4.2 4.3

• 1.

1.1. . : , . , .

- ( ), , , , , .

, , , , , (, ).

: (xi, f(xi)), i = 0,1,...,N f(x) [ ]a b, . .

1.2 ( 1.1)

=

=N

iiiN (x)) Lf (x (x) L

0 (1.1)

)x)...(xx)(xx)...(xx(x)x)...(xx)(xx)...(xx(x

(x) LNiiiiii

Niii

=

+

+

110

110 . (1.2)

a=x0 xi xN=bx

y

.1.1 .

Li (x) ,

• Li (xj) =ij , i, j [ ] 0, N , ij - - :

=

=.ji 0,

j;i 1,ij

- N, . [ ]x xN0 , : N ( 1), . . - [ ]x xN0 , . , . , . . , , .

1.3. -

: = x0 < x1

• ai0 = fi-1; ai0 + ai1 hi + ai2 hi2 + ai3 hi3 = fi; ai1= f i 1 ; ai1 + 2ai2 hi + 3ai3 hi2 = f i . : ai0 = fi-1; ai1= f i 1 ;

ai2 = 3(fi -f i-1)

hi2

2fi-1hi

f ihi

; (1.4)

ai3 = 2(fi-1-fi )

hi3

fi+1hi

fihi

2 2+

+

.

u = (x - xi-1) / hi. (1.4) (1.3) fi-1, fi, f i 1 f i ,

() = [ ]f (u) f (u) f (u) f (u) hi-1 i i 1 i o i+ + + 1 0 1 . (1.5) , o (u) = 1- 3u

2 + 2u3; 1 (u) = 3u

2 - 2u3; 0 (u) = u - 2u

2 + u3; (1.6) 1 (u) = -u

2 + u3 . .1.2. 1.3.

0( )

u 1 0

11( )

u10

1

u10

0( )1

u10

1( )1

. 1.2 .

a=x0 xi xN=bx

y

.1.3 -

• . (1.5), fi-1 fi, - f i 1 f i ,

() [xi-1, xi]. : , f i

? :

= + +fif f

hf f

hi i 1

i

i 1 i

i

, i = 1,2,...,N-1

= +

=

+ +

f0f f

hf f

h

f f fh

f fh

1 0

11

2 1

2

NN-1 N-2

N-1

N N-1

N

( )

( )

1

1

1

1 1

N N

(1.7)

i = + +h

h hi

i i 1

, i i1= . (1.8)

. , . .

1.4 - -. , ( ). - . . - ( ) - 2, .. . 1. , [, b] , 0. spline. - , . , , (.1.4).

• a=x0 xi xN=bx

y

.1.4 -

-,

: EI s () = - (),

s - ; () - , ; EI - . , , s (x), , . , 1 . , , s (0) = s (N) = 0. , . -, , . -, , . , , , , s (0) = f (0) s (N) = f (N) s (0) = s (N) = 0, ,

.

[ ] [ ] s (x) dx f (x) dx2 2

a

b

a

b

, (1.9)

f (x) =s (x). s (i) = fi. s (xi) = mi, i = 0,1,...,N. [xi-1, xi] (1.5) s x f u f u m u m u hi i i i i( ) ( ) ( ) [ ( ) ( )]= + + + 1 0 1 1 0 1 . (1.10)

.

• =

+ +

+ + s (x)

f fh

(6 12u)m ( 4 6u)

hm ( 2 6u)

hi i 1

i2

i 1

i

i

i

, (1.11)

:

+ =

+

=

++

+

+

+

+

s x

s x

i

i

( )

( )

0 64 2

0 62 4

1

12

1

1

12

1

f fh

m mh

f fh

m mh

i i

i

i i

i

i i

i

i i

i

(1.12)

i (i = 1,2,...,N-1) s (i + 0) = s (i - 0) iiiiii cmmm =++ + 11 2 . (1.13)

c f fh

f fhi i

i i

ii

i i

i

=

++

+

3 11

1( ) .

m0, mi,..., mN, ( ). ( ):

1. s () = f (), s (b) = f (b) 2. s () = f (), s (b) = f (b). mi:

22

0 0 1 0

1 1

m m cm m m ci i i i i i

+ =+ + = +

* * ;; (1.14)

N N N Nm m c* * . + =1 2

(1.14) 1: 0 0

* *= =N , c f0 02

* = , c fN N

* = 2 , 2 (1.12):

0 1* *= =N ,

cf f

hh

f01 0

1

103 2

* =

,

cf f

hh

fNN N

N

NN

* =

32

1 .

(1.14) . , , .

• 1.4.1. . i :

a b

c a b

c a b

c a

y

y

y

y

N N N

N N

N

N

N

N

1 1

2 2 2

1 1 1

1

2

1

1

2

1

0 0 0 0

0 0 0

0 0 0

0 0 0 0

...

...

...

...

=

M M

. (1.15)

. yi = vi yi+1 + ui , i = 1,2,...,N-1. (1.16) yi-1 (1.16) yi-1 = vi-1 yi + ui-1 , i- (1.15): ci yi-1 + ai yi + bi yi+1 = i . (ai + ci vi-1) yi + bi yi+1 = i - ci ui-1. (1.17) (1.17) (1.16), vi , ui ( ): v0 = u0 = 0;

v ba c vi

i

i i i

= + 1

; (1.18)

u c ua c vi

i i i

i i i

=+

11

, i = 1,2,...,N-1.

, yN = uN. (1.16) ( ).

1.5 y = f (x) c . , . , , . , , F (x, y) = 0, .

• F (x, y) = 0 .

. , y = f (x) F (x, y) = 0, x = x (s) y = y (s) s ( 1.5 a,). 1.5.

a)

1

x(s)

2

3 4 5

6 7

8

s )

1

y(s) 2 3

4 5 6

7 8

s

c)

1

y 2 3

4

56

7

8

. 1.5 -.

-

r = r (s) = x (s) i + y (s) j + z (s) k, (1.19) i, j k - . r = r (s) - , : x = x (s), y = y (s) z = z (s) ( 1.6 ,,).

a)

1

x(s)

2

3 4

6

5

7

8

s )

1

(s)

2 34 5

6 7

8

s )

1

z(s)

2 3

4

5 6

7

8

s

1

y

2 3

4

56

7

8

z

. 1.6 (3D) -.

• , , , , (, ). , s , , , , . - () , .. s0 = 0, si = si-1 + | ri - ri-1 |, i = 1,2,...,N, (1.20) | ri - ri-1 | = ( ) ( ) ( )x x y y z zi i i i i i + + 1 2 1 2 1 2 . , , , , , . , . , s (xi, si), (yi, si), (zi, si) . . . , (1.18) vi ai + ci vi-1 . , , . - , , | mi | = | ri | 1. , rg, :

=

r

r r

r rig i

g i

. (1.21)

2 r = 0 . , ( , ), . . , , (N + 1) ( + 1) , K N . , . - 1, - N. (1.10) [si-1, si]:

• r s r u r u m u m ui i i i i i( ) ( ) ( ) [ ( ) ( )]h= + + + 1 0 1 0 1 , (1.22) hi = si - si-1, u = (s - si-1) / hi , mi - , .

mi-1 = mi = r rr r

i i

i i

1

1

, hi = | ri - ri-1 |. (1.23)

(1.22) , r s r u r u r r u u

r u u u r u u u r u r ui i i i i

i i i i

( ) ( ) ( ) ( )[ ( ) ( )][ ( ) ( ) ( )] [ ( ) ( ) ( )] ( )= + + +

= + + + = +

1 0 1 0 1

1 0 0 1 1 0 1 1

- . , . ( ), , ( ).

1.6

1.6.1.

,

, - . . , . , ,

L2 =4 2 8 ( ) ,

L = 2 2 . (1.24) - (.1.7);

= +

( ) /x yx y y x

2 2 3 2

. (1.25)

1.6.2. - . , ( ).

/

.1.7

• , , , , . .

P1 P2

P3

P0

P6

P4 P5P7

P8

PC

BA

D

. 1.8

, . . (.1.8) P0, P1, P2, P3, P4, P5, P6, P7, P8, Pk. (1.26) : P0, P6, P1, P2, P4, P5, P3, P8, P7, Pk. (1.27) ( ): P0, P6, P1, P2, P4, P5, P3, P7, Pk. (1.28) . , ; , - . , (1.28). : [P6, P1], [P2, P4], [P5, P3], [P7, Pk]. (1.29) - ( ). Ax + By + Cz + D = 0, ( ) s: F (s) = Ax (s) + By (s) + Cz (s) + D = 0. (1.30) , . .

• (1.30) , . , .

1.6.3 . .

. , - , , . .

: 1. , - ,

. 2. , . .

.

( , ..) - . , , (, , ..) . .

:

1. . 2.

. 3. , ,

. 4.

. ,

, .

. , .

. (.. )

,, - [,,1], 1 -

• , , [x y z ] , - .

[x y z ] , , ,, , , . .

= x / , = y / , = z / . , , ,

- .

1. Ax + By = C

[ x y ]

BA = C [x y 1 ]

CBA

= 0 . :

[ x y ]

CBA

= 0 . [ x y 1 ] -

CBA

-

. 2. x + y = 1 3x - 5y = 0

:

[ x y ]

5131 = [ 10 ] [x y 1 ]

0151

31 = [ 0 0 ] .

32 , . , ,

[ x y ]

101051031

= [ x y ].

.

.

3. x = y2 x = u2 . y = u . :

[ x y 1 ] = [ u2 u 1]

100010001

= [ u2 u 1].

33 . , , . .

• : x` = a1x + b1y + c1z + d1 , x` = a1x + b1y + d1 ,

y` = a2x + b2y + c2z + d2 , y` = a2x + b2y + d2 , z` = a3x + b3y + c3z + d3 .

. ( ) .

, .

, ( x`, y`, z` ) ( x , y , z ) :

[ x` y` z` 1 ] = [ x y z 1 ]

1ddd0cc0bbb0aaa

321

321

321

321

c; [ x` y` 1 ] = [ x y 1 ]

100

21

21

21

ddbbaa

.

, , , () .

: 1. . ( )

( x , y , z ) ( x`, y`, z` ) :

[ x` y` z` 1 ] = [ x y z 1 ]

1010000100001

zyx

; [ x` y` 1 ] = [ x y 1 ]

1010001

yx

,

x , y , z - x , y z .

2. . ( x , y ) :

[ x` y` 1 ] = [ x y 1 ]

1000cossin0sincos

.

. , ( x ,

• y ) - ( x , y) .

, ( x , y ) , ( x , y)

[ x` y` 1 ] = [ x y 1 ]

1010001

MM yx,

(x`,y`) :

[ x`` y`` 1 ] = [ x` y` 1 ]

1000cossin0sincos

.

, .. :

[ x``` y``` 1 ] = [ x`` y`` 1 ]

1010001

MM yx .

x , y (). :

[ x`` y`` 1 ] = [ x y 1 ]

1010001

MM yx

1000cossin0sincos

1010001

MM yx .

. .

. . .

X, (0,0,0), :

[ x` y` z` 1 ] = [ x y z 1 ]

10000cossin00sincos00001

.

, , X .

Y :

• [ x` y` z` 1 ] = [ x y z 1 ]

10000cos0sin00100sin0cos

.

Z, , :

[ x` y` z` 1 ] = [ x y z 1 ]

1000010000cossin00sincos

.

:

1) (x,y,z) ( );

2) X (0,0,1) (a,b,c) X Y ( R Q);

3) X ( F);

4) , ( R-1 Q-1);

5) , ( -1) .

6) 4- 5-

. ,

R Q F R-1 Q-1 -1 . 3. .

.

[ x` y` z` 1 ] = [ x y z 1 ]

1000000000000

z

y

x

SS

S

.

Sx , Sy , Sz , .

Sx , Sy , Sz .

• 1.7

( , ) () , . .

x

. 1.9 .

, , . , , , (.1.9). , - . , , . , , , , . :

(u) = ( ) [ ( ) ] + =

u dxR

u x ya

b

ii i

i

N2 2

0

1 . (1.31)

Ri > 0 - , , ; u () - .

( ) u dxa

b2 (. 1.9),

. , . . . , s () = s (b) = 0 (1.32)

• , , , (1.31) s (). , mi Mi = Si . s () [xi-1, xi]:

s ()= M x xh

Mx x

hii

ii

i

i

+

11 . (1.33)

hi = xi - xi-1, Mi - . M0 = MN = 0. . (u - s ), u (x) - , s () - , ( (1.32)) : (u - s ) = (u ) - ( s ) - 2 , = +

= =

S u SR

S y u Sii

N

X

X

ii i i i

i

N

i

i

( ) ( )( )1 0

1 1 . (1.34)

, = 0, (u - s ) = (u ) - ( s ) 0 (1.35) ( (u - s ) - ). , ( s ) (u), .. . (1.33) Si . = 0 : s (xi) = yi - Ri Li , i = 0,1,...,N, (1.36) Li =

M Mh

M Mh

i i

i

i i

i

+

+

1

1

1 - (1.37)

i - . : M-1 = MN+1 = 0, h0 hN+1 0. (1.36) s (xi) = yi . Mi (i = 1,2,...,N-1) , s () () , .. s (xi - 0) = s (xi + 0), s (xi - 0) = s (xi + 0). (1.38) (1.33) (1.36) (1.38), N - 1 : ci-2 Mi-2 + bi-1 Mi-1 + ai Mi + bi Mi+1 + ci Mi+2 = Fi ; (1.39) a1 = c0 = b0 = 0; bN-1 = cN-1 = cN-2 = 0;

ai = 1 1 1 1 1

32 12

12 1 1h

Rh h

Rh

R h hi

ii i

ii

i i i+ + + + ++ +

+ +( ) ( ) ;

i = 1,2,...,N-1

bi = - ( ) ( )1 1 1 1 1 1

61 1 21

11h h

Rh h

Rh

hi i

ii i

ii

i+ + +

+

+ + ++

++ ; (1.40)

• i = 1,2,...,N-2

ci = 1

1 21h h

Ri i

i+ +

+ ; i = 1,2,...,N-3; Fi = ( )y y

hy y

hi i

i

i i

i

+

+

1

1

1 .

(R0, R1,..., RN) , (1.39) ( Ri ) ( Ri) Mi (1.36). Ri = 0 (1.39) . , yi , Ri. k, , Rk = 0. yi, .. | s (xi) - yi | i (i = 0,1,...,N). (1.41) Ri. Ei =s (xi) - yi , (1.42) (1.36) (1.41)

Ri = EL L

i

i

i

i

. (1.43)

(1.43) Ri , :

Ri(j+1) = ii

jL ( ), (1.44)

j - . Ri(0) = 0 , . , Li(j) = 0, Ri(j+1) = 0. , (1.44) . , (1.44) :

Ri(j+1) = Ri(j) i

ij

ijR L( ) ( )

= Ri(j) ii

jE ( ). (1.45)

, j- i- (1.41) ( |Ei(j) | > i ), Ri

(j+1) < Ri(j) , .. (j + 1)- Ri . i. , j- |Ei(j) | < i Li

(j) 0, Ri , (1.41) .

• , s (xi) . , yi , . xi , i- . , i : i = Ai | Li |. (1.46)

Ai = 1 32

12

1

/h hh h

i i

i i

+

++. (1.47)

,

Ai = 1 3 11

3

/h h

h hi i

i i

+

++

. (1.48)

r (s) = x (s) i + y (s) j + z (s) k . . , ~si . .1.10

x

y

. 1.10

• 2.

2.1. , , . . . . . - . , , . r = r (u, v), (2.1) r (u, v) - - . (2.1) x = x (u, v); = y (u, v); (2.2) z = z (u, v). u v - , .

2.2. , , u v 0 1 (.2.1).

ru(0,0) rv(0,0)

ruv(0,0)r(0,0)

rv(u,0)

ru(0,v) r(0,v)

u=0 r(u,v)

r(1,0)ru(1,0)

rv(1,0) ruv(1,0) r(1,v)

ru(1,v)

r(1,1) ru(1,1)

ruv(1,1) rv(1,1)

r(u,0)

r(0,1)

rv(0,1)ru(0,1)

ruv(0,0) r(u,1)

u=1

v=0

rv(u,1)

v=1

.2.1

• r (u, v), 0

• - ;

Q =

r r r r

r r r r

r r r r

r r r r

v v

v v

u u uv uv

u u uv uv

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

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

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

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

0 0 0 1 0 0 0 1

1 0 1 1 1 0 1 1

0 0 0 1 0 0 0 1

1 0 1 1 1 0 1 1