Компьютерная графика: методические указания к лабораторному практикуму

  • Published on
    08-Dec-2016

  • View
    214

  • Download
    2

Embed Size (px)

Transcript

  • ,

    .. , ..

    -

    2005

  • ,

    , . , , , , .

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

    .. .. . , .

  • 3

    , ,

    , , . . , .

    , , . , .

    - . . , , , , , , . .

    , , .

    -. , . , .

  • 4

    1 1

    1.1

    . , ( ) . , . , .

    1.2 1.

    .

    , , - , .

    : Y = kX + b, (1) k=0, k=1, k=10, k=0.2, k=1,5;

    . dy/dx = y/x = const, (2) const k, .

    (, Bezier).

    , , .

    X = x1(1-t) + x2 t, Y = y1(1-t) + y2 t, (3)

    , 1(1,1) , 2(2,2) ,

    t=0,...,1 ( t

  • 5

    1.3 2.

    . , .

    : (X - a)2 + (Y - b)2 = R2, (4) =150, b=100 R=50 (=0, b=0 R=80);

    X = a + RCos(), Y = b + RSin(), (5) , ( =3.14159);

    dy/dx = - x/. , , , (- X) Y:

    X n+l = Xn + y n, Y n+l = Y n - n, (6)

    ,

    . , 2-n (2n-1

  • 6

    , (8). q , Sin( ) Cos( ) .

    :

    Xn+l = nCos()+YnSin(); Yn+l = YnCos() - nSin(), (8) = 2 /n (n -

    ). .

    , . , .

    1.4 3. .

    . 3+ .

    . , , .

    .

    : ( ) (). () .

    .

    : = R(), (9) :

    X= Cos(), Y= Sin(); (10)

  • 7

    (), :

    X=a+RCos()+ACos(), Y=b+RSin()+BSin(), (11)

    (),

    : X=a+RxSin(/Dx+Dy),

    Y=b+RySin(/Dx+Dy) (12) 1.5 4.

    , , 1.

    1

    2, .

    2

  • 8

    2 2

    2.1

    (1-)S1 + S2 = 0 , (13) S1 S2 ( ) , -

    1 0 . S1 S2 4 ,

    P(x,y) : = S1(xp,yp)/[ S1(xp,yp) - S2(xp,yp)] (14) , , S,

    3.

    3 4

    : (k1X + b1Y + C1)(k2X + b2Y + C2) = 0 (15) , , (1-)t1t2 + t3t4 = 0 , (16) t1, t2, t3 t4 - . .

    [ 1(x1,y1), 2(x2,y2) ] [ t1 ,t2 ],

  • 9

    l . , ( 4),

    (1-)t1t2 + l2 = 0 , (17)

    F(xF,yF) :

    = t1t2(xF,yF)/[ t1t2(xF,yF) - l2 (xF,yF)]. (18)

    2.2 1.

    , 5, . (-40,0), D(-20,80) (0,100) , . (-40,0), G(-20,-30) F(0,-40) , .

    5 6

    2. 6 . 0.2.

    3. , (0,0), (1,0), (1,1), D(0,1) (3/2,1/2). .

    2.3 2.

    = R (), (19)

  • 10

    X = Cos() Y = Sin() (20) 2.4 3.

    ,

    : = a *(5+2 *Cos() + 3*Cos(m)sign(Cos()))--b*(Sin(18*))2 *Cos(/2))8, = a * Cos(4*t) + b = t c*Sin(4 + t ), = a *(1 + Cos(3*) + b* Sin(3*))2

  • 11

    3 3

    3.1 1.

    . R1 R2. , R3 , ( ).

    R2 R1, . R3 R2.

    7 3.2 2

    (

    ) Bezier 1, 2 3- ,

    Px(t)=Cimti(1-t)m-iXi,

    Py(t)=Cimti(1-t)m-iYi, (21) m - , i=0,...,m. 3.3 3

    (

    ) Bezier . , .

  • 12

    4 4

    4.1 ()

    ,

    . , .

    4.2 1

    , , 1:1

    ( ), AutoCAD. .

    , . 4.3 2

    ,

    Bzier . , . .

    4.4 3

    -

    . , . .

    P(t) = P1(t) + P2(t) + P3(t), (22)

    tPPP iit 211 *][21)( += ,

    PttP it 122 *)(*2)( = ,

    )1 2213 (*][21)( += tPPP iit .

  • 13

    t 0,...,1. (x,y) .

  • 14

    5 5

    5.1

    , . .

    8

    U () V ().

    . V U ( 1).

    .

    F(x,y,z) = 0, z=f(x,y), :

    x = X(u,v), y= Y(u,v), (23) z = Z(u,v).

    u v .

    .

    U () V ().

    . -

  • 15

    V U .

    .

    : F(x,y,z) = 0, z=f(x,y), x = X(u,v), y= Y(u,v), z = Z(u,v).

    u v . 5.2 1.

    . oZ. . . , , oY.

    .

    5.3 2.

    . , .

    - Bzier ( ), 1(0,100), 4(100,0) 2(30,20), 3(80,140).

    . 120. 1.

    : = 30)( CosxyX , += 30)( SinxyzY a (24) : Sin(30)= 0.5, Cos(30)= 0.866

    .

  • 16

    6 6 6.1

    , ,

    ( ) ( ).

    ( ).

    , . , , .

    6.2

    u.

    9

    . , , r0, u1 u2. r0. ( ) u1 u2 ( 9). r u r', r=r-zu.

    x' ' , r'= r0+x'u1+y'u2 r'=r-z'u= r0+x'u1+y'u2.

    . u1 u2

    ', ', z'. ,

  • 17

    (25) u1 u u2 u, x' '.

    , ,)uu(uu))(ur(rx

    12

    10

    =

    ,)uu(uu))(ur(ry

    12

    20

    = (26)

    , . . u=u1 u2, : x' = (r-r0)u1, y' = (r-r0)u2, z' = (r-r0)u3.

    , .

    . xA-yA-zA 10.

    10

    oZ

    Ya :

    = - 1+x2, Ya =-z1-z2+za (27)

    kx,ky kz :

    =-kxCos +ykyCos, Ya =-kxSin -ykySin +zaky (28)

  • 18

    , kx=ky=kz ==30 , , :

    =(y-)Cos30 ,

    Ya =z-(y+)Sin30 (29)

    6.3 ()

    r', r rn (

    ) 11.

    11

    , , r0 -

    , u1 u2, - r'=zr+x'u1,+y'u2. , , r

    rn , z r'=zr+(1-z)un . : r'= zr+x'u1,+y'u2 =zr+(1-z)un .

    u2 (r-rn ), u1 (r-rn ) u1 u2, x, y z.

    , , , .

    d, rn =r0+du, u=u1 u2,.

    ,

    , (30)

  • 19

    6.4 1

    . ( ) . S(500,300,100).

    12

    .

    6.5 2

    . . ( )

    . , .

    .

  • 20

    13

  • 21

    7 7

    7.1 (AutoAD)

    , CorelDraw, CorelHara, Designer . AutoAD Autodesk. , , . AutoAD 1982 . 1989 AutoAD10. 14, AutoAD-2002 AutoAD-2004. .

    AutoAD .

    7.2 1.

    AutoCAD, .

    . . .

    7.3 2

    AutoCAD,

    ( ). .

  • 22

    8 8

    8.1

    , . , , , , .

    , , . , , .

    . . , , .

    8.2 1. :

    .

    . =

    2b2a + : kx = 0,5, ky =0.5 = 49.

    14

  • 23

    8.3 2 .

    15

    : (X-a)2 + (Y-b)2 = R2. , , n=4. f = 0,3. , , , = 2. 8.

    8.4 3 .

    : :

    yCosxSinYySinxCosX

    +=+=

    cyxxdYxdyxxcX

    +=

    +=

    )()(

    0

    00

  • 24

    n=4. 16

    8.5 4

    .

    17

    ( 1/3), . . n = 4.

  • 25

    9 9

    9.1

    . , , : , .

    9.2

    . -, , . , , .

    , .

    , , , , . , , , .

    , , , . .

    AutoCAD.

    (*.DXF) , . . (*.DWG), .

  • 26

    , DXF - , . (SHX-).

    9.3

    7 DXF

    . DXF .

  • 27

    10 10

    10.1

    , . . , , , . , . , , , . , , , . 0,3 - 0,4 . , (). : Auto CAD , . .

  • 1. , . [] /. - .: , 1986.- 398 .

    2. , .. AutoCAD 14 []/ .. , .. , .. - .: 2000

    3. , . []/ . - .: 1992.

    4. , . []/ . , . - .: , 1976. 253 .

    5. , . . []/. , . - .: , 1982.

    6. , .. []: / .. , .. , .. - : , 2003.

    7. , . AutoCAD. []/ .. - .: , 1991.- 284 .

  • ()

    4

    .1 1,13,25

    .2 2,14,26

    t

    d1

    R

    hRx

    d1

    b

    Y

    Y1

    R2

    R1

    R3

    d

    YR1

    b

    a

    d1

    R

    X

    t

    h

    Rx

    R2

    R 3

    15

  • 30

    .3 3,15,23

    .4 4,16,20

    R2

    b

    R

    Rx

    t

    R3

    A

    Bd

    h

    d1

    R1

    xS

    t

    d

    45

    hR2

    R1

    b1

    a 1

    R

    R3

    Y

    b

    RX

  • 31

    .5 5,17,29

    .6 6,18,30

    x

    d1

    h

    b

    Y

    Y1

    R2

    R 3

    R1

    t

    Rx

    d 1

    R

    R2

    h

    Rx

    R3

    15

    d

    Y

    R 1b

    a

    d1

    R

    X

    t

  • 32

    .7 7,19

    .8 8,24

    45

    xS

    t

    dh

    R3

    Yb

    RX

    R2

    R1

    a1

    b 1

    R3

    tR

    R2

    b

    h

    d

    R1 A

    Rx

    d1

    B

  • 33

    .9 9,21

    .10 10,22

    Rx

    h

    d1

    t

    d1

    R

    R2Y1

    R1 R3

    Y

    x

    b

    d

    Y

    R 1b

    a

    d1

    R

    X

    t

    h

    R x

    R2

    R3

    15

  • 34

    .11 11,27

    .12 12,28

    Rx

    B

    A

    d1

    h

    d

    R1

    R

    R2

    t

    R3

    b

    R

    x S

    t

    d

    hY

    b

    RX

    R3

    45

    a1

    b1

    R2

    R1

  • ()

    .1 .

    R R1 R2 R3 S a a1 b b1 d d1 h t x Y Y1

    1,13,25 90 26 45 26 - 65 - 37 - 34 37 10 38 82 53 -

    5,17,29 85 37 41 26 - 53 - 34 - 30 41 9 34 86 51 -

    9,21 82 30 37 30 - 50 - 30 - 26 37 8 30 90 45 -

    2,14,26 71 26 26 19 - 52 - 37 - 30 45 9 33 75 64 30

    6,18,30 75 41 41 22 - 64 - 41 - 34 48 10 38 90 71 34

    10,22 67 30 30 19 - 56 - 34 - 30 45 9 33 82 67 26

    3,15,23 75 26 22 15 86 45 33 30 37 33 - 10 40 101 40 -

    7, 19, 71 37 30 13 90 41 30 33 39 37 - 12 42 97 34 -

    11,27 67 48 38 11 94 37 27 36 41 41 - 10 40 93 28 -

    4, 16,20 90 75 38 22 - 60 - 38 - 30 34 10 38 30 26 -

    8, 24 86 82 56 30 - 67 - 41 - 34 38 12 42 34 30 -

    12,28 84 80 47 27 - 63 - 44 - 32 42 9 40 36 32 -

  • 36

    ()

    .1- 5

    1

    += 2

    21 xarcSinY 16

    22 )34( += xxY

    2

    2252 2 += xxY 17 )14(2 += xxCosY

    3 )1)(1( 2 += xxY 18 )21( 2xarcCosY +=

    4 tgxxxY )1)(1( += 19

    xxxY 2)1( 3 +=

    5 451 2 ++= xxY 20

    2)2)(1( xxxY +=

    6 )1(

    22 +

    =xctgxY 21 )1ln(

    2 = xxY

    7 x

    XY ln= 22 12 +

    =XtgXY

    8 )1ln( 2 ++= xxY 23 x

    xxY

    =2

    9 1

    5

    =x

    xtgY 24 xxxY )1)(1( +=

    10 xxY

    +

    =11ln

    21 25 )1)(1(

    2 ++= xxY

    11 )4(

    422

    3

    +=

    xY 26 xxY += 4

    12 23axY = 27

    3353 2 = xxY

    13 CosXSinXY 3+= 28 )3

    (2 += xSinY

    14 xY 423 = 29

    )32( 2 = xctgY x

    15 )5.123( 2 += xxSinY 30 )1ln( 2 = xxY

  • 37

    ()

    6

    .1 - 1,15,30

    .2 - 2,16

    .3 .3 - 3,17

  • 38

    .4 - 4,18

    .5 5,19

    .6 6,20

  • 39

    .7 7,21

    .8 8,22

    .9 9,23

  • 40

    .10 10,24

    .11 11,25

    .12 12,26

  • 41

    .13 13,27

    .14 14, 28

    .15 15,29

  • 42

    ()

    AutoCAD

    AutoCAD ,

    : ) ; ) ; ) . ,

    : : (Command:).

    ( , ..) , (), . , , < >.

    AutoCAD : 1) ; 2) ,

    (). "".

    .1

    : )-,

    OX OY ; ) -

    , : , , .. , , ..., .

    -.

    .2 AutoCAD

    . , ... (UNITS), . :

  • 43

    ) (UNITS) - , ;

    ) (PRECISION) - , ;

    ) (ANGLES)- , .

    .3

    (LIMITS). . .

    .4 AutoCAD , - , . .

    .4.1 : (Command:)_(Line:) :(From point:)30,10 :(To point:) 30,30

    .4.2

    ( ) : , , .. , 50,50 30 .

    : (Command:)_(CIRCLE) 2T(2P)/3T(3P)/KKP(TTR): 50,50 (Diameter):: 30 .4.3

    , , .

    - : (Command:)_ (PLINE) - : (From point:) 0, 0

  • 44

    - (urrent line-width is):0.0 - (Specify next point or)

    [(Arc)/(CLose)/(Halfwidth)/(Length)/(Undo)/(Width)]: (W)

    - (Starting width):1 - (Ending width): 1 - (Specify nd point of line): 20, 40 - (Specify nd point of line): 90, 60 - ,

    , 1. - (Arc).

    (Specify nd point of arc or) [ (Angle)/(CEnter)/(CLose)/(Direction)/ (Halfwidth)/(Line)/(Radius)/ (Second pt)/(Undo)/(Width)]: (S) , . . (Specify Second point of arc) . (Specify nd point of arc)

    .5 , , AutoCAD, , . , , 3 :

    ) ; ) ; ) . (EDIT)

    (MODIFY). .5.1 AutoCAD

    . : (Select object):

    - . . .

  • 45

    (Select object): (W), .

    , , .

    .5.2 ()

    (ERASE). : (ERASE) : (Select object):

    . (ERASE)

    . (TRIM)

    . , . , , . 6 .

    : (TRIM) :

    (Select cutting edge(s) (Select object): . , (Select cutting to trim): , .

    , , , .

    (TRIM) (EXTEND).

    .5.3 (MOVE), (COPY),

    (ROTATE), (SCALE) . : (Select object): . (Base point or displasement): . (Second point or displasement): . (MIRROR) . .

  • 46

    : (MIRROR) (Select object): . (First point or mirror line): . (Second point): . ?(Delete old objects? ): .

    .5.4

    (PEDIT) , (PLINE).

    : (PEDIT) (Select polyline): . (Close) - . (Join) - , . (Width) - . (Edit vertex) - . (Fit) - . (Spline) - -. .(Decurve) - . (Ltype gen) - . (Undo) - . (eXit) - . .6 .6.1

    (HATCH). , , , , , , . , . , , .

    (HATCH) (Boundary Hatch).

    (Pattern...). (Hatch pattern palette). , . ...

  • 47

    (Boundary Hatch) , , , (Apply).

    .6.2

    ...(Dimensoin Styles) . (Dimension Style Manager) (Modifi) : (Text)- , , ..;

    (Dimension lines) , , ..;

    (Linear dimensions) , .

    .6.3

    (DIMENSIONS) . (DIMLINEAR) -

    . : ENTER (First

    extension line origin or ENTER for select): .

    (Second extension line origin): .

    ( / / / //)

    Dimension line location (Mtext/Text/Angle/Horizontal/Vertical/ Rotated): , .

    (DIMALIGNED) - , , . .

    :

    (DIMBASELINE) -

  • 48

    (DIMCONTINUE) - .

    (DIMANGULAR) - , , , .

    : , , : Sel...

Recommended

View more >