To install OpenGL on your computer, Follow the Below Instructions For Ubuntu/Fedora/Any Unix Operating systems, type these below commands on the terminal
sudo apt-get install freeglut3 freeglut3-dev
sudo apt-get install binutils-gold
You're Done!
For Windows users, to set up OpenGL on Codeblocks, first Install codeblocks on your machine and follow the below steps
- copy the glut32.dll to c:\windows\system
- copy the glut32.lib to c:\program files\mingw\lib
- copy glut.h to c:\program files\mingw\include\GL
- Add behaviour to linker settings in codeblocks!
- You're done!
Advice : Use Unix operating systems to avoid complexity
To Run the file on codeblocks just click on Build and run
To run the file on the terminal(Unix) type
gcc -lGL -lGLU -lglut filename.c
./a.out
Design, develop, and implement the following programs in C / C++
-
Program to recursively subdivide a tetrahedron to from 3DSierpinski gasket. The number of recursive steps is to be specifiedby the user.
-
Program to implement Liang-Barsky line clipping algorithm.
-
Program to draw a color cube and spin it using OpenGLtransformation matrices.
-
Program to create a house like figure and rotate it about a givenfixed point using OpenGL functions.
-
Program to implement the Cohen-Sutherland line-clippingalgorithm. Make provision to specify the input line, window forclipping and view port for displaying the clipped image.
-
Program to create a cylinder and a parallelepiped by extruding acircle and quadrilateral respectively. Allow the user to specify thecircle and the quadrilateral.
-
Program, using OpenGL functions, to draw a simple shaded sceneconsisting of a tea pot on a table. Define suitably the position andproperties of the light source along with the properties of theproperties of the surfaces of the solid object used in the scene.
-
Program to draw a color cube and allow the user to move the camerasuitably to experiment with perspective viewing. Use OpenGLfunctions.
-
Program to fill any given polygon using scan-line area fillingalgorithm. (Use appropriate data structures.)
-
Program to display a set of values {fij} as a rectangular mesh.