Help with XYZ math surface syntax I'm trying to model a 'super egg' in Blender. https://en.wikipedia.org/wiki/Superegg

When sweeping the curve, the formulas for X and Y should be

X = abs(cos(t)**(2/2.5)) * sign(cos(t))
Y = abs(sin(t)**(2/2.5)) * sign(sin(t))


I'm having trouble translating those into the format that Blender wants.

I assume that it's Python syntax, so first I tried to solve that there doesn't seem to be a 'sign' function.
So I added this in the 'A helper function'

0 if cos(u) == 0 else -1 if cos(u) &lt; 0 else 1

When I then put abs(cos(u))**0.8*a into the formula for X, Blender gives me the error message TypeError: 'NoneType' object is not subscriptable which I can't make sense of.

Any help will be appreciated :)
The problem was the abs function.

I opened up the script that creates the mesh ("..\Blender 2.82\2.82\scripts\addons\add_mesh_extra_objects\add_mesh_3d_function_surface.py"). It has a list of 'accepted' functions at the top and abs isn't included. However fabs is. When I changed the formula for X to fabs(cos(u))**0.8*a it worked as expected.