MCSL-054 IGNOU STUDY MATERIAL

Page 58

Lab Manual

Session 3: Exercise 7. WAP in C/C++ to implement a DDA Line-drawing algorithm (without using inbuilt line() function). Exercise 8. WAP in C/C++ to implement a Bresenham’s Circle generation algorithm (without using inbuilt circle() function). Exercise 9. WAP in C/C++ to draw the convex Polygon ( a polygon is convex if a line connecting any two points of the polygon lies entirely within it) and fill a color in it. Session 4: Exercise 10. WAP in C/C++ using OpenGL to draw a tic-toc-tie board as shown in the following figure.

Figure-1

Exercise 11. Modify your program-2 for thick lines and stippled lines as shown in Figure 2(a), 2(b).

Figure 2(a)

Figure 2(b)

Exercise 12. WAP in C/C++ using OpenGL to draw a hard wire house as shown in Figure3. Use basic primitive of openGL. 120

40 40

100

Figure-3

Session 5: Exercise 13.WAP in C/C++ using OpenGL to draw a checkerboard by writing a routing checkerboard (int size) that draws the checkerboard as shown in Figure 4. Place the checkerboard with its lower-left corner at (0,0) and each of the 64 square, where W and B represents white and black colour, respectively.

62


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.