Fog Test Computer Graphics Project in OpenGL Source Code – 18CSL67

 

Fog Test Computer Graphics Project in OpenGL Source Code – 18CSL67

Here you can download the source code of Fog Test Computer Graphics Project in OpenGL – 18CSL67 for the academic min-project.

Project Description:

In the modern world, there is no field without computers, because of its easy use and efficient working one can get the work done easily whenever and where ever required. It is all because of the portability that the applications provide to the computers. In the same way, the graphics are the major advantage of the computers which has made its presence so worthy that there is no field in computers without the graphics being used, thus in any display system or any application we look into there will be graphics.

Graphics has found its application in:

  • Scientific applications
  • Simulations
  • Designing
  • Animations
  • Entertainment and so on…

This package i.e. FOG TEST defines all about the determining effects of fog and lighting. In this project I’m used light sources i.e. ambient light means uniform lighting. The surface of the object is specified as specular (shiny surface) and diffuse (uniform scattering of light). The perspective view is used.

In this project i.e. FOG TEST I’m implementing the graphics operations like translation, rotating, and scaling. 3-D objects are used. On these objects, the effects of fog are shown.  Translation, rotation and scaling are done by glTranslatef(), glRotatef() and glScalef() functions respectively.

Module Description of Fog Test Computer Graphics Project

myinit: It is used to initialize the projection matrix, identity matrix, modelview matrix, and lighting effects.

Draw : In this function, I’m used different colors to draw the objects specified.

In this we have four different cases:

case 1 Teapot is drawn by using red color.

In case 2 Tetrahedron is drawn by using purple color.

case 3 Dodecahedron sky blue color.

case 4 pipe is drawn by specifying points and colored green.

Special key: This function is used for rotating the defined objects in the project. This function is used to specify the keyboard arrow keys for the rotation of the objects.

The first case up arrow is used for upward rotation of the object.

 The second case down arrow is used for downward rotation of the object.

In the third case right arrow is used for the right rotation of the object

The fourth case left arrow is used for the left rotation of the object

Key: This function is used for Fog effects on the defined objects in the project. In this function, I’m specified keyboard keys for seeing the effects of the fog on objects.

In first case “d” is used for increase the fog density on the object.

second case “D” is used to decrease the fog density on the object.

Flow Diagram of Fog Test Computer Graphics Project

Fog Test Computer Graphics Project in OpenGL Source Code – 18CSL67

Screenshots of Fog Test CGV mini-Project

Increase and decrease of fog on objects and rotation

Increase and decrease of fog on objects and rotation

Seletcing Dodecahedron from menu object is displayed as above

Selecting Dodecahedron from menu object is displayed as above

By selecting Tetrahedron from the menu the object is displayed as above

By selecting Tetrahedron from the menu the object is displayed as above.

Subscribe to our YouTube channel for more videos and like the Facebook page for regular updates.

4 thoughts on “Fog Test Computer Graphics Project in OpenGL Source Code – 18CSL67”

Leave a Comment

Your email address will not be published. Required fields are marked *