POV-Ray : Newsgroups : povray.advanced-users : Best fit plane : Re: Best fit plane Server Time
29 Jul 2024 02:34:18 EDT (-0400)
  Re: Best fit plane  
From: Warp
Date: 8 Mar 2003 08:29:16
Message: <3e69f02c@news.povray.org>
Kevin Loney <klo### [at] pt2mcom> wrote:
>   #local Normal = Normal + <(P.z+C.z)*(P.y-C.y), (P.x+C.x)*(P.z-C.z),
> (P.y+C.y)*(P.x-C.x)>;

  I think that there might be a problem with the '+' operations there
(don't they need to be '-'?). To avoid any typing mistakes and to
optimize/simplify the code, you can write it like this:

#local Normal = Normal + vcross(P,C);

  However, what I wonder is if this can work. Some of the normals will
point to one side of the "plane" and others will point to the other.
Their sum can point virtually anywhere, depending on the arrangement of
the points.
  If the points were sorted in clockwise (or the anti-clockwise) order,
then it will probably ok.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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