Search Projects

Monday, June 13, 2016

Spotlight's attenuation

Here we present another simple OpenGL Computer graphics C++ program. This is another spotlight program as previouly we have seen Spotlight swing. The program is similar but with a twist.
Description of the Spotlight's attenuation :

This program draws an array of spheres lit by a spotlight whose cone angle can be changed and which can be moved as well. The spotlight cone is shown by a wireframe. The spheres are colored using color material mode.

Interaction in Spotlight's attenuation:
Press the page up/down keys to increase/decrease the spotlight cone angle.
Press the arrow keys to move the spotlight.
Press 't/T' to decrease/increase the spotlight's attenuation.
Simple words we have so many balls of different colors lying on surface. There is a light source. We can move the light source and also able to decrease the diameter of the source with some keyboard interaction.

Future Enhancement of the Program :

1. We can remove the wire frame as light and give it a proper look.
2. Ball and other objects can also be added in the program.
3. Light source should also move up and down, can foucs at many different angle.
4. Whole Program can be converted into 3D version.
Do write about the program, if you have something to add to it or alter the program or a new version do send us to openglprojects@gmail.com. We welcomes your feedback, do comments and write to us.

Download the Source Code!

No comments:

Post a Comment