|
|
Does anyone have a good way of finding Normal vectors in
smooth_triangles? I'm working on an image with lots of triangles and I
would like to be able to use smooth triangles in stead of the standard
ones.
I've tried one method of using vcross on each vertex like this:
// p1,p2, and p3 are vertexes of the triangle
n1 = vcross((p2-p1),(p3-p1))+p1;
n2 = vcross((p1-p2),(p3-p2))+p2;
n3 = vcross((p2-p3),(p1-p3))+p3;
This method doesn't work well when there are multiple triangles
connected, though,
so I tried averaging the vectors from each point and using that, and it
seems to work.
Is there a better, more accurate way to find normals?
Thanks for the help,
Josh English
eng### [at] spiritonecom
Post a reply to this message
|
|