POV-Ray : Newsgroups : povray.advanced-users : Best fit plane : Re: Best fit plane Server Time
29 Jul 2024 02:24:57 EDT (-0400)
  Re: Best fit plane  
From: Tor Olav Kristensen
Date: 8 Mar 2003 10:18:21
Message: <Xns9338A5D0A8227torolavkhotmailcom@204.213.191.226>
Warp <war### [at] tagpovrayorg> wrote in news: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 '-'?).

No. It works as it is.

Note that this:
<
  (P.z - C.z)*(P.y - C.y),
  (P.x - C.x)*(P.z - C.z),
  (P.y - C.y)*(P.x - C.x)
>
is NOT equal to vcross(P, C)


> 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. 
...

It won't.


But this should:

#declare Normal = Normal + vcross(P - C, P + C);



Tor Olav


Post a reply to this message

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