Advertisement

object detection

Started by October 07, 2001 03:35 PM
3 comments, last by ogl 23 years, 4 months ago
Hi say you have a torch and you want it to shine only on the front face of a cube - how can this be achieved - so basically the cube or the torch could be moved in any orientation but the torch shines on front face of the cube when it detects it any ideas?? cheers
Calculate the normal for the face and the torch, then use the dot product of those normals to get an angle depicting how closely they face one another. Then make the ''lightness'' a factor of how close the angle is to them facing each other.

[Resist Windows XP''s Invasive Production Activation Technology!]
Advertisement
any sample code or demos where this is done?

cheers
Just use OpenGL''s lighting.
Don''t use OpenGL:s lighting.

This topic is closed to new replies.

Advertisement