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};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,global_ambient);
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
Project Code: Download
Header File: 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.
Header File: Download
is it working?
ReplyDeleteYes it working 100%.
ReplyDeleteIf you have any problem post it here in comments.
do u have any other projects like sorting technology, finding minimal spanning tree using kruskal's alg, working of atm n/ws................
ReplyDeletenice
ReplyDeleteIts not working showing error as;
ReplyDelete1>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
sir i got link error when executing the program that CTRStartup...
ReplyDeletehello 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
ReplyDeleteGet 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.
ReplyDeleteWhy 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.
please upload project reports. it will be very helpful for us
ReplyDeletePleaz send me the code for this project
ReplyDeleteguyz am having that code .. last year i did this same project.. you can check it in ma blog.. janeeval4u.blogspot.in
ReplyDeletei want synopsis for the prolect simple move light
ReplyDeletedid u make the project report?
ReplyDeleteplease send me goal of this project
ReplyDeleteSir i want to change the color of the ball. when it rotate ...how can i do...plzz help me
ReplyDeletetry to experiments with drawScene(void) function there give color
ReplyDeletewhat all modification i can do in this project...can u suggest me sir??
ReplyDeleteTry a logic so that the ball moves and color changes or say color go next to next. You can use call list for that!
ReplyDeleteCan you move the light horizontally on the plane xz instead of xy?
ReplyDeleteYes It is posible to have that with little modification in code
ReplyDeleteCan u give me the codes for output page for displaying my clg name nd my name plsss...
ReplyDelete