Computer Aided Design2 ppt

Embed Size (px)

Citation preview

  • 8/7/2019 Computer Aided Design2 ppt

    1/15

    Computer Aided Design

    GEOMETRIC MODELING USING

    Interactive

    M .Elango

    Lecturer in Mechanical Engineering

    Thiagarajar college of EngineeringMadurai

    ICG

  • 8/7/2019 Computer Aided Design2 ppt

    2/15

    Types of Computer Graphics

  • 8/7/2019 Computer Aided Design2 ppt

    3/15

  • 8/7/2019 Computer Aided Design2 ppt

    4/15

  • 8/7/2019 Computer Aided Design2 ppt

    5/15

  • 8/7/2019 Computer Aided Design2 ppt

    6/15

    A local area network - connected with CAD Workstation

  • 8/7/2019 Computer Aided Design2 ppt

    7/15

    7

    Interactive Computer Graphics

    User

    Application

    Screen

    input

    image

  • 8/7/2019 Computer Aided Design2 ppt

    8/15

    8

    Representations in graphics

    Vector Graphics

    Image is represented by continuous geometric

    objects: lines, curves, etc.

    Raster Graphics

    Image is represented as an rectangular grid ofcoloured squares

  • 8/7/2019 Computer Aided Design2 ppt

    9/15

    9

    Representations in graphics

    Vector Graphics

    Image is represented by continuous geometric

    objects: lines, curves, etc.

    Raster Graphics

    Image is represented as an rectangular grid ofcoloured squares

  • 8/7/2019 Computer Aided Design2 ppt

    10/15

    10

    Vector graphics

    Graphics objects: geometry + colour

    Complexity ~ O(number of objects)

    Geometric transformation possible withoutloss of information (zoom, rotate, )

    Diagrams, schemes, ...

    Examples: PowerPoint, CorelDraw, ...

  • 8/7/2019 Computer Aided Design2 ppt

    11/15

    11

    Raster graphics

    Generic

    Image processing techniques

    Geometric Transformation: loss of information

    Complexity ~ O(number of pixels)

    Jagged edges, anti-aliasing Realistic images, textures, ...

    Examples: Paint, PhotoShop, ...

  • 8/7/2019 Computer Aided Design2 ppt

    12/15

    12

    ConversionVector graphics

    Pattern

    Rasterization, recognition

    Scan conversion

    Rastergraphics

  • 8/7/2019 Computer Aided Design2 ppt

    13/15

    line-drawing algorithm

    dx = x2 - x1

    dy = y2 - y1forx from x1 to x2

    { y = y1 + (dy) * (x - x1)/(dx)

    plot(x, y) }

    It is assumed here that the points have already been ordered so that

    x2 > x1. This algorithm works just fine when dx> = dy, but it is quite slow

    on a digital computer, as it requires floating-point calculations. Ifdx abs(x1 - x0)

    ifsteep then

    swap(x0, y0)

    swap(x1, y1)ifx0 > x1 then

    swap(x0, x1)

    swap(y0, y1)

    intdeltax := x1 - x0

    intdeltay := abs(y1 - y0)

    realerror := 0realdeltaerr := deltay / deltax

    intystep

    inty := y0

    ify0 < y1 then ystep := 1 else ystep := -1

    forx from x0 to x1

    ifsteep then plot(y,x) else plot(x,y)error := error + deltaerr

    iferror 0.5 then

    y := y + ystep

    error := error - 1.0

    *** Some Exercises On AutoCAD using Points and Line Command ****