How can i calculate values for the GL_SPOT_EXPONENT parameter of opengl-lighting

for my programm i have to compute values for the GL_SPOT_EXPONENT parameter, when specifying a spotlight
does someone know how to do it
having:

  • a cutoffangle
  • a beamwidth== an inner solid angle in which the light source emits light
    at uniform full intensity
  • a radius == the radial extent of the solid angle and the maximum distance
    from a location that may be illuminated
    by the light source.

thanks for your help

maybe does someone have an idea?

Just an idea: Look for spotlights in the pov-ray documentation. They describe the mathematics behind each function in their docu. Maybe its usable to you.

www.povray.org

[This message has been edited by Kilam Malik (edited 08-16-2000).]