Computer Graphics

The course had 4 assignments:

  1. Line Clipping
  2. Simulating The Entire Pipeline of rendering an actual scene
  3. Modelling A Bike through Heirarchical Modelling Techniques
  4. Ray Tracing

Assignments:

  1. Line Clipping

    1. Implementation of Cyrus Beck Line Clipping Algorithrm for convex 2D polygons(code):



      A Convex Polygon and a Line
      Clipped Line: Internal Clipped(White), External Clipped(Red)


    2. Implementation of a self developed Line Clipping Algorithrm for convex as well as concave 2D polygons(code):



      A Concave Polygon and a Line
      Clipped Line: Internal Clipped(Yellow), External Clipped(Red)


    3. Implementation of Cyrus Beck Line Clipping Algorithrm for convex 3D polyhedrons(code):




      A Solid Convex Polyhedron and a Line
      The same Convex Polyhedron and Line in wire frame

      Clipped Line: Internal Clipped(White), External Clipped(Red)


  2. Simulating The Entire Pipeline of rendering an actual scene(code):






    Original World Scene with Camera, Clipping and Image Planes, A Hut.
    Scene after applying a Perspective Transformation


    Scene after applying a Perspective And Shear Transformation
    Scene after applying a Normalisation Transformation


    Scene after applying a Clipping by the Clipping Planes
    Final Projected Image rendered on the Image Plane

  3. Modelling A Bike through Heirarchical Modelling Techniques

    We used Display Lists in OpenGL for Heirarchical Modelling. The bike was further enhanced to follow the laws of physics and could move following the laws of physics.(code):



    Wire Frame Model of the Bike
    Bike


    Another View(without Mud Guard)


    Illustration of Motion(Mpeg 1.1M)
    (click on the image above)

  4. Ray Tracing:

    We implemented a recursive ray tracer which could handle reflections as well. We implemented various basic object types: polygon (plane), sphere, general quadrics, box, polyhedron, etc. We also included Constructed Solid Geometry (CSG) modeling for more general objects. The most general projective transformations could be applied to any of the object for more flexibility.

    A movie with moving view point(Mpeg 124KB)
    (click on the image above)



    CSG intersection object
    CSG subtraction object

    Stereo: Making stereo images after this was a trivial task. Just taking images from two different view points corresponding to the left and right eyes. These two images can be then merged using a color scheme so that the 3D effect can be seen by viewing through red and blue filters.



    Left View
    Right View

    Stereo(Can be seen using red and blue filters)


People:

Nipun Kwatra, Pankaj Garg