7CS7 COMPUTER GRAPHICS & MULTIMEDIA LAB (Common to Comp. Engg. & Info. Tech)

**Objectives:**

At the end of the semester, the students should have clearly understood and implemented the
following:

1. To produce a single pixel and pre specified pattern on screen:

2. To implement features like changing background color, foreground color, resizing of
window, repositioning of window:

3. To implement mid point algorithm to draw circle and ellipse:

4. Use the line drawing & circle drawing programs to draw composite objects containing
only circle & lines. You can take shapes like a cart, car etc.

5. To Implement Clipping (various algorithms).

6. Simple fonts, graphical fonts, scalable fonts.

7. Input a polygon by drawing lines, use appropriate methods for filling and filling
convex & concave polygons.

**Suggested Platform/Tools:**

1. For this lab, the students can choose any platform either Microsoft Windows or Linux.

2. Compilers & Libraries: Microsoft Platform- Visual Studio.Net, Linux – Xlib/OpenGL.

3. No turbo C/C++. No library function except the one required to put a single pixel on the
screen.

Indicative List of Experiments:

1. Programs to produce a single pixel produce a pre specified pattern with features like changing
background color, foreground color, resizing of window, repositioning of window must be
demonstrated.

2. Use Mid Point algorithm to draw line between two points. The program must be independent
of the slope i.e. lines of all slopes must be drawn.

3. Use Mid Point algorithm to draw ellipse. Implement circle drawing as a special case of ellipse.
Extend this to draw arcs between points.

4. Programs to draw composite objects containing circles & lines, drawing lines thicker than one
pixel, you can take shapes like a cart, car etc.

5. Programs to demonstrate text generation e.g. simple fonts, graphical fonts, and scalable fonts.

6. Programs to demonstrate filling algorithms eg. filling convex & concave polynomials. The
program must be able to (i) input a polynomial by drawing lines (ii) determine whether convex
or concave (iii) use appropriate methods for filling.

7. Programs to demonstrate clipping algorithms eg. program to clip a (i) line and (ii) polygon
using Cohen-Sutherland Clipping algorithm(s), clipping lines, circles against a rectangular clip
area.

8. Programs to demonstrate presentation of geometrical objects e.g. circle and rectangle with
audio description i.e. size, color of boundary and interior etc. played synchronously one after
another.