POV-Ray : Newsgroups : povray.general : Calculate normal vector? : Re: Calculate normal vector? Server Time
1 Aug 2024 20:13:23 EDT (-0400)
  Re: Calculate normal vector?  
From: alphaQuad
Date: 26 Sep 2008 14:50:00
Message: <web.48dd2e6592437aab8ea364160@news.povray.org>
angle of 2 vectors:
#if (degrees(radang2(nA,nB)) < "somenumber") add nB to tally for this vert(nA),
normalize.

nA was initialized to "this" triangle normal before comapring to adjacent
triangle/planes

AN important part of this variable angle logic, hope this helps in the long run.

nested triangle loops comparing all triangles for adjacency, 3 times for each
vert in ea triangle. If not compiled this would be slow for large objects.


Post a reply to this message

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