Computer-Graphics

Introduction to the important algorithms og Computer Graphics

View the Project on GitHub

Algorithms in Computer Graphics

Though there are a lot of the algorithms used for various purposes in graphics, here we’ll be dealing with very few of them that are easy to understand, as a beginer.

These algorithms are are related to the folowing concepts:

  • Line Drawing
  • Line Clipping
  • Circle Drawing
  • Curve Tracing
  • 2D & 3D Transformation
    • Scaling
    • Translating
    • Shearing
    • Reflecting
    • Rotating
    • Projection etc..

Most of these algorithms are from the prescribed practical list of syllabus of B.Sc. (H) Computer Science. Hence, those are placed separatly into practicals directory.

Practical List

Impleted Algorithms:

Following are some C++ programs where the above listed programs are implemented:

  1. Bresenham’s Line Lrawing Algorithm:
    Output Screenshot

  2. Mid-Point Circle Drawing Algorithm:
    Output Screenshot

  3. Cohen and Sutherland Line Clipping Algorithm:
    Output Screenshot

  4. Sutherland Hodgeman Polygon Clipping Algorithm:
    Output Screenshot

  5. Scan Line Fill Algorithm for Polygon:
    Diring the execution of algo.
    Output Screenshot After complete fill
    Output Screenshot

  6. 2-D Transformations:
    Input co-ordinates
    Output Screenshot Reflection
    Output Screenshot
    Output Screenshot Rotation
    Output Screenshot
    Output Screenshot

  7. 3-D Transformations:
    3-D Figure
    Output Screenshot Scaling
    Output Screenshot
    Output Screenshot Perspective Projection
    Output Screenshot
    Output Screenshot

  8. Hermite / Bezier Curve:
    Output Screenshot

Apart from these, Digital Differential Analyzer(DDA) is also implemented that is one of the earlier algorithms, used for line drawing.

The output of DDA is:
Output Screenshot