Hello.
I made my own graphing system using blocks and my own equations. I've also made my own custom 3D axes that range from -71 to 71 on all axes. The only problem is that when I try to graph something, the graph goes out of the y-axis range. I have used math.clamp(partPosY, -71, 71) to fix it, but no luck.
Here are some screenshots (Couldn't convert them to links for some reason...):
My custom 3D axes: https://gyazo.com/442f35edcd3d02a8f0660eeffdb539bf
Graph went out of range on the y-axis (min:71, max:71) https://gyazo.com/5772e2b944d13b58a48d803bd4d324c6
Is there a way to accomplish this? Here is my code snipplet:
function grp(part)
local finalF = Vector3.new(part.Position.X, (part.Position.X^3*part.Position.Z+part.Position.Z^3*part.Position.X)/2000, part.Position.Z)
part.BodyPosition.Position = Vector3.new(finalF.X, finalF.Y, finalF.Z)
end

3 comments
Woops, didn't even address clamping the maximum value; editing.
It works when it limits between -71 and 71, but this happens: https://gyazo.com/4a2f6516582199a3ff57334e13c54713. The only way to fix that problem is by dividing the whole equation by a big number. But that's going to be a problem for other graphing equations too. :(
Oh, that's fair. I'll edit the answer with a solution.