POV-Ray : Newsgroups : povray.general : Suggestion for new object : Re: Suggestion for new object Server Time
13 Aug 2024 19:30:05 EDT (-0400)
  Re: Suggestion for new object  
From: Dan Connelly
Date: 11 Jul 1998 16:31:04
Message: <35A7BD69.E25D5B72@flash.net>
Nice post!  

However, the following test may well yield false warnings due to
floating point rounding problems, I suspect.

I more careful approach might be to normalize the dot product
by the magnitude of the cross product, take the magnitude of
the difference, and compare it against a small positive number,
taking care to avoid singularities.


Dan


Chris Colefax wrote:
> 
>    #local _MB_normal1 = -vcross(FP1 - FP2, FP2 - FP3);
>    #if (vdot(_MB_normal1, FP4 - FP1) != 0) #local _MB_warning = "point1, point2,
point3, and point4 are not co-planar" #end

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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