Computer Graphics Laboratory (cgl) Codes

If the code doesn't load, you can check it out on GitHub

Group A

Q1: Write C++ program to draw a concave polygon and fill it with desired color using scan fill algorithm.


                

Q2: Write a C++ program to implement the Cohen-Sutherland line clipping algorithm.


                

Q3a: Write a C++ program to draw the following pattern. Use DDA line and Bresenhams circle drawing algorithm. Apply the concept of encapsulation.


                

Group B

Q4a: Write a C++ program to draw a 2-D object and perform the following basic transformations: Scaling, Translation, Rotation. Apply the concept of operator overloading.


                

Q5b: Write a C++ program to generate a Hilbert curve using the concept of fractals.


                

Group C

Q6b: Write C++ program to draw 3-D cube and perform following transformations on it using OpenGL: Scaling, Translation, Rotation about an axis (X/Y/Z).