Компьютерная графика, осень 2011: Визуализация в 3D

  • Published on
    08-Feb-2017

  • View
    104

  • Download
    2

Embed Size (px)

Transcript

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    1

    3D

    URL: http://www.school30.spb.ru/cgsg/cgc/

    E-mail: CGSG@yandex.ru

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    2

    V1

    V0

    V2

    V3E0

    E1

    E2

    E3

    E4

    P0P1

    V={V0, V1, V2, V3}={(x0,y0,z0), (x1,y1,z1),}

    E*={#V*1, #V*2, #P*1, #P*2}

    E0={0,1,0,-1}E1={1,3,1,-1}E2={3,2,1,-1}E3={1,2,0,1}E4={2,0,0,-1}

    P*={#V*1, #V*2, #V*3 , #E*1 , #E*2 , #E*3}

    P0={0,1,2,0,3,4}P1={1,3,2,1,2,3}

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    3

    V1

    V2

    V3

    V4

    V5

    V0

    triangle strip(0,1,2),(2,1,3),(2,3,4),(4,3,5)

    V0

    V1 V2

    V3

    quad

    V0

    V1

    V2

    V3

    V4

    V5quad strip

    V0

    V1 V2V3

    V4

    V5

    triangle fan(0,1,2),(0,2,3),(0,3,4),(0,4,5)

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    4

    :

    openStructure(Id1);setLocalTranformation(rotateX(...));addPolygon(...);setLocalTranformation(rotateX(...));openStructure(Id2);setLocalTranformation(rotateX(...));addPolygon(...);...

    closeStructure();openStructure(Id2);setLocalTranformation(rotateX(...));addPolygon(...);...

    closeStructure();...

    closeStructure();

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    5

    :

    openStructure(Id);closeStructure();

    setPolygonAttribute(...);addPolygon(...);

    setLocalTranformation(matrix_4x4);matrix_4x4 rotateX(angle);matrix_4x4 rotateY(angle);matrix_4x4 rotateZ(angle);matrix_4x4 scale(sx, sy, sz);matrix_4x4 translate(dx, dy, dz);

    postRoot();

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    6

    :

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    7

    depth cueing ( ):

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    8

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    9

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    10

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    11

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    12

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    13

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    14 (shading)

    (wireframe) (flat shading) (Gouraud shading) (Phong shading)

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    15Pixar Shutterbug

    3 Orthographic views Parallel projection

    Perspective View (no hidden lines) Depth cuing (hidden lines)

    http://www.siggraph.org/education/materials/HyperGraph/shutbug.htm

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    16Pixar Shutterbug

    Colored Visible line determination (with facets)

    Visible surface determination (constant shading) Shaded by facets

    http://www.siggraph.org/education/materials/HyperGraph/shutbug.htm

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    17Pixar Shutterbug

    Gouraud shaded (diffuse) Gouraud shaded (specular)

    Phong shaded (polygon based) Phong shaded (curved surfaces based)

    http://www.siggraph.org/education/materials/HyperGraph/shutbug.htm

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    18Pixar Shutterbug

    Multiple lights Texture mapping

    Bump mapping and shadow Reflection mapping

    http://www.siggraph.org/education/materials/HyperGraph/shutbug.htm

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    19

    :Up[W] Down[W]

    (x,y):if (y > Up[x]){SetPixel(x,y);Up[x] = y;

    }if (y < Down[x]){SetPixel(x,y);Down[x] = y;

    }

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    20Backface culling

    ( CW, CCW)

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    21

    1. ( )2. 3.

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    22Z-

    - -pz = z (x,y) pz

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    23 (list priority)

    Z ( )

    ,

    .

    () - P: - Q, P z:

    P Q x?

    P Q y?

    P Q ?

    Q P ?

    P Q (x,y) ?

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    24

    1

    2

    3

    A

    B

    C

    D P1

    P2

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    25

    z z

    zz

    x x

    xx

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    26

  • Viz3DViz3D

    ..- 30

    Computer Graphics Support Group

    27

    ( 20.11.2011) 3D

    ( ):

    - : y=f(x,z)

    2-3

    2-3

    z- , ( ) .

Recommended

View more >