Hi,
I was wondering if any of you kind fellows could help me with a problem...
I am currently writing some software for modelling involute gears in
3D: the 3D processing being handled by Microsoft's DirectX. My problems start when I come to cast light onto the model. To effectively light an object I need to know the normal vectors at each of the vertices. The parametric equation I am using to generate the tooth profile is:Xi = r*(cos(t)+t*sin(t)) Yi = r*(sin(t)-t*cos(t))
Where t is the parametric variable and r is the radius of the gear's base circle.
Could anyone tell me how I could go about calculating the normal vectors? I think it has something to do with taking a unit vector to the tangent line (as calculated by differentiation?), but I'm clueless how to actually go about doing this. Any help would be much appreciated.
Many thanks,
Dax