POV-Ray : Newsgroups : povray.general : Calculate normal vector? : Re: Calculate normal vector? Server Time
1 Aug 2024 14:28:35 EDT (-0400)
  Re: Calculate normal vector?  
From: B  Gimeno
Date: 25 Sep 2008 17:30:01
Message: <web.48dc017892437aaba5f67c3f0@news.povray.org>
Greetings,
I hope that no one feels annoyed about this repetitive question automatically
translated, but I'm stuck at the point of finding the normal to a given
triangle. I've read and re-read the answers given in this forum but I keep
stopping with this.

A triangle whose vertex are generated by a nested while-loop. (v1,v2,v3)

I attempt to find the normal by normalizing the product of vectors:

#local N = vnormalize(vcross( (v2 - v1) , (v3 - v1) ))  ;

Then I apply the normal obtained to a smooth_triangle, and the result is uh....
unsmoothed_triangles.

smooth_triangle {v1,N,v2,N,v3,N}


An example image is posted to p.b.i. under calculating normal vector FH topic

thanks in advance for any incoming help
B. Gimeno


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.