POV-Ray : Newsgroups : povray.newusers : Help - very difficult when it should be easy : Re: Help - very difficult when it should be easy Server Time
29 Apr 2024 15:04:11 EDT (-0400)
  Re: Help - very difficult when it should be easy  
From: Trevor G Quayle
Date: 16 Nov 2016 17:00:01
Message: <web.582cd6cdba97f5c181c811d20@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> That looks good when I run your code - when I let it rip on a big array of
> triangular coordinates, I get a "Domain error in atan2()"
>
> I'll study your code and try to track down the cause.  Probably
> degenerate/coincident points or something.

Actually you'd also have to check the second instance as well:
#declare RotY = degrees(atan2(Vec.z,Vec.x));
and ensure that z & x aren't the same.  If they are, then the box is vertical
and doesn't need rotation about y.

-tgq


Post a reply to this message

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