POV-Ray : Newsgroups : povray.bugreports : Bad values crash POV-Ray : Re: Bad values crash POV-Ray Server Time
28 Oct 2024 04:49:55 EDT (-0400)
  Re: Bad values crash POV-Ray  
From: Tor Olav Kristensen
Date: 20 Oct 2024 16:30:00
Message: <web.671567c235f9a6c0892957989db30a9@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > So here's how I got it to NOT crash, but my mapping results suck.
> >
> > Remove all of the protective select () and mod () functions, and it will crash.
> >
>
> Here's what you can do to make it work:
>...

Sorry, I made a little mistake in the code below:

>...
> #declare s2d =
>     function(X, Y) {
>         select(
>             X*X + Y*Y,
>             select(
>                 1 - X*X*Y*Y,
>                 sqrt(
>                     (X*X + Y*Y - 2*X*X*Y*Y)/
>                      ((X*X + Y*Y)*(1 - X*X*Y*Y))
>                 )*X,
>                 sqrt(0.5)*X,
>                 sqrt(
>                     (X*X + Y*Y - 2*X*X*Y*Y)/
>                      ((X*X + Y*Y)*(1 - X*X*Y*Y))
>                 )*X
>             )*X,

Remove the last *X above


>             0,
>             select(
>                 1 - X*X*Y*Y,
>                 sqrt(
>                     (X*X + Y*Y - 2*X*X*Y*Y)/
>                      ((X*X + Y*Y)*(1 - X*X*Y*Y))
>                 )*X,
>                 sqrt(0.5)*X,
>                 sqrt(
>                     (X*X + Y*Y - 2*X*X*Y*Y)/
>                      ((X*X + Y*Y)*(1 - X*X*Y*Y))
>                 )*X
>             )
>         )
>     }
> ;
>...

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

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