Search Projects

Sunday, May 8, 2011

Computer Graphics Mini-Project Simple Move Light


Description: Example program illustrating a simple use of lighting.  Creates six spheres of different fully saturated colors. Adds a white light that slow rotates around the spheres.

USAGE: Press "r" key to toggle (off and on) running the animation
               Press "s" key to single-step animation.
              The up arrow key and down array key control the time step used in the animation rate.  This will speed up or slow down the rate at which the light revolves around the spheres.
        Press ESCAPE to exit.

       This lighting model is build on the basis of phong model,Which supports three types of light material interactions namely Specular, ambient, diffuse. The ambient source color represents the interaction of a light source with surface whereas the specular source color is designed to produce the desired color of a specular highlights.
     Lighting model is built by summing the contributions for all the light sources at each point we wish to light. For each light source, have to compute the amount of light reflected for each of the nine terms in the illumination array. The contribution can be computed for each color source by adding the ambient, diffuse, specular components.
       There are four vector parameters that can set, the position of light source and amount of ambient, diffuse, specular Light associated with the source.  Both lighting should be enabled and particular source. When small amount of white light is needed, even when all light sources are turned off or disabled  following code can be used.
Glfloat global_ambient[]={0.1,0.1,0.1,0.1};


Future scope
Ø  It is the basic model of Simple Move Light
Ø  It will be used in the fields of animation.

Ø  In future this program can be improved by using of new opengl functions.

Computer Graphics Mini-Project Free Source Code Download 

We are giving the Computer Graphics Mini-Project free source code download. To help other students we need your help as well. Kindly if you modify this projects or any other kindly post email or post the projects code to help future students.

Project Code: Download
Header File: Download


  1. Yes it working 100%. 

    If you have any problem post it here in comments.

  2. do u have any other projects like sorting technology, finding minimal spanning tree using kruskal's alg, working of atm n/ws................

  3. Its not working showing error as;
    1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup1>C:\Documents and Settings\Babin\My Documents\Visual Studio 2005\Projects\myproject\Debug\myproject.exe : fatal error LNK1120: 1 unresolved externals

  4. sir i got link error when executing the program that CTRStartup...

  5. hello sir am selected this as my mini project but my front page was not linking with it.and i want it's flow chart and algorithm.could u plz help me

  6. Get help from teacher. Why they are present? Just for humilating no offcourse...... i have mine own work so i can't help out. There is no report or flowchart for it in records so i can't sent it to you.

    Why you all are so lazy? Just want to eat cooked food. Try to make yourself man and do labour don't go of from it.

  7. please upload project reports. it will be very helpful for us

  8. Pleaz send me the code for this project

  9. guyz am having that code .. last year i did this same project.. you can check it in ma blog..

  10. i want synopsis for the prolect simple move light

  11. did u make the project report?

  12. please send me goal of this project

  13. Sir i want to change the color of the ball. when it rotate can i do...plzz help me

  14. try to experiments with drawScene(void) function there give color

  15. what all modification i can do in this project...can u suggest me sir??

  16. Try a logic so that the ball moves and color changes or say color go next to next. You can use call list for that!

  17. Can you move the light horizontally on the plane xz instead of xy?

  18. Yes It is posible to have that with little modification in code

  19. Can u give me the codes for output page for displaying my clg name nd my name plsss...