My question is, would there be a way to, just by changing values, to give that sphere more of a “gourd”, or an 8 shape? Basically like what’s on this quick drawing:

Hey @Potiron , fun question! My math skills aren’t fantastic, but I think you should try to find an alternative for r that you can use in the y = r * cos(phi) calculation. It may be some kind of polynomial that generates a curve, or a trig function of some kind. Sometimes the math is easier if the origin is the center.

A really fun option you could try is to generate a curve with an ofPolyline (using its .curveTo() or .bezierTo() methods) and then use values from the curve in place r when calculating y. The ofPolyline class has lots of great functions for getting points, angles, and etc from an ofPolyline. Because my math skills aren’t awesome, I’d likely try this option first. Again, the math might be easier if you keep the origin at the center. This way, values of y < 0 can be the regular r (a constant), and values of y > 0 can be from the ofPolyline. This might be a great way to go too, because changing the shape would only involve regenerating the ofPolyline, rather than applying new coefficients to an equation, or applying a whole new equation to generate the new shape.