From: | Matthias Bock |
Date: | 13 Apr 2000 at 21:23:43 |
Subject: | Creating normal vectors |
Hello, a problem with normals...
A program reads the triangles and quads from files created with the cinema4D
raytracer. Unfortunatly, the surfaces are not in an appropriate order to
create normals out of them. Somehow I have to examine the structure to see
which side of a triangle is the outside of the object. (I hope you can follow
me)
For convex objects I can calculade the center of the object and make a
scalar-product between vector from center to the point of question and the
normal. If both vectors point in the same direction, the normal vector is
correct, otherwise I have to flip it. But this is very complicated - is there
an easier way to do this?
It also works with convex objects. How do I do this job with irregular
objects? Any ideas?
CU,
Matthias