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