Advertisement

Calculating Normals

Started by March 21, 2003 05:06 AM
4 comments, last by brutus 21 years, 11 months ago
Is there a quick way to calulate the normal vetor for a curved suface. The only method that I can find that calculate this is by using partial diffrentiation.
Certainly that''s the correct option. To be used offline.
If you plan to calculate them online them use du and dv with discrete delta ( the difference between you last u and v and your current u and v in their relavent directions ), then simply use the cross product to generate the normal.
Nick.Gravity's not just a good idea. It's the law!
Advertisement
Well, you can certainly find an analytical solution to your problem, depending on the type of curve that you have and on its form (using partial derivatives, as you have mentionned). What kind of curve are you dealing with?

Cédric
The question was more out of interest. I became confused after reading on a web site about calculating the normal vector from the cross product of two connect edges ie on a triangle, and then reading about using partial diffrentiation as another method. Which one would be best to use in a game situation.
That''s a question?

quote:
Original post by brutus
I became confused after reading on a web site about calculating the normal vector from the cross product of two connect edges ie on a triangle

This works only with flat surfaces (i.e: planes, triangles,...)
quote:
and then reading about using partial diffrentiation as another method.

When you use partial derivatives, you will also need the cross product.

Cédric
Hi,

For a game where you need the normal of a curve you could either represent the curve as triangles and get the normal for each tri. Another way would be to calc the normal offline and store it in a table, but of course if the curve is going to be dynamic and move around you''re in trouble with the second method.

Using a PDE would be too slow I think for a real-time situation.

This topic is closed to new replies.

Advertisement