As usual, this is coming from a newbie. So, any help is appreciated! I've been learning the Pixel Processor well enough to get by, but this problem has me stumped. I am trying to transform a square texture to disc, and found a formula that works in JavaScript (the source page has an excellent demo) but I'm doing something wrong with it in Pixel Processor.

Here's an illustration of the concept:

Here's the math:

https://sta.sh/0qer3u6c5v6

This is the graph:

https://sta.sh/023st37kvwq2

I suspect one of my problems is defining the center (I tried extending the range to -1 to 1, but I still get a slightly warped banding)... oh, and the Pixel Processor contains:

https://sta.sh/01uz0lm80wux

I can move all this to a new .sbs and attach it, if needed. Right now, it's in a graph with other PP experiments. Again, any help is welcomed. Assuming the math is right, the problem is how I'm handling it in Designer. My search for help online mostly turned up equirectangular mapping (none of which are problem free, trading off distortion at the poles with worse distortion--mostly stretching--along the prime-anti-prime meridians). The square-to-circle method I'm working on is part of a workaround I could feed into a polar-to-cartesian (or two) I'll put up on share, assuming I can get it to work.

Thanks!

Here's an illustration of the concept:

**Edit:**I found a linkable image.Here's the math:

https://sta.sh/0qer3u6c5v6

This is the graph:

https://sta.sh/023st37kvwq2

I suspect one of my problems is defining the center (I tried extending the range to -1 to 1, but I still get a slightly warped banding)... oh, and the Pixel Processor contains:

https://sta.sh/01uz0lm80wux

I can move all this to a new .sbs and attach it, if needed. Right now, it's in a graph with other PP experiments. Again, any help is welcomed. Assuming the math is right, the problem is how I'm handling it in Designer. My search for help online mostly turned up equirectangular mapping (none of which are problem free, trading off distortion at the poles with worse distortion--mostly stretching--along the prime-anti-prime meridians). The square-to-circle method I'm working on is part of a workaround I could feed into a polar-to-cartesian (or two) I'll put up on share, assuming I can get it to work.

Thanks!