Search Projects

Showing posts with label Light Torus. Show all posts
Showing posts with label Light Torus. Show all posts

Wednesday, August 3, 2011

Light Torus : Animating Lights over the objects


torus

Description: Program to demonstrate how to add lighting and material properties to a torus.This program extends the program Wrap Torus.  The triangles or quadrilaterals are wrapped around the torus in a single long strip.


USAGES: There are a number of keyboard commands that control the animation.  They must be typed into the graphics window, and are listed below

   CONTROLLING RESOLUTION OF THE TORUS MESH

     Press "W" to increase the number wraps.
     Press "w" to decrease the number wraps.
     Press "N" to increase the number of segments per wrap.
     Press "n" to decrease the number of segments per wrap.
     Press "q" to toggle between quadrangles and triangles.
   
   CONTROLLING THE ANIMATION:

     Press the "a" key to toggle the animation off and on.
     Press the "s" key to perform a single step of the animation.
     The left and right arrow keys controls the rate of rotation around the y-axis.
     The up and down arrow keys increase and decrease the rate of rotation around the x-axis.
     In order to reverse rotational direction you must zero or reset the torus ("0" or "r").
     Press the "r" key to reset the torus back to initial position, with no rotation.
     Press "0" (zero) to zero the rotation rates.

   CONTROLLING LIGHTS:


     Press '1' or '2' to toggle the first or second light off and on.
     Press 'f' to toggle between flat and smooth shading.
     Press 'l' to toggle local modes on and off (local viewer and positional light,or non-local viewer and directional light).

   COMMANDS SHOWING OPENGL FEATURES:


     Pressing "p" toggles between wireframe and polygon mode.
     Pressing "f" key toggles between flat and smooth shading.


Project Code: Download
Header File: Download