Home  •  Tutorials  •  Calculators  •  3D Models  •  About  •  Contact Tutorial 21: How to Model Complex Parametric 3D Surfaces 3D surfaces can be defined parametrically, with three functions x(u, v), y(u, v) and z(u, v). While the parametric equations of simple surfaces such as a cylinder or sphere can be easily derived with just a pencil and paper, others, such as a spinning hypocycloid orbiting around a center which itself is rotating, seem impossibly complex. This tutorial provides a system and method for deriving the equations of even the most complex of 3D surfaces using the multiplication of transformation matrices based on an online calculator we have developed. Here are some examples of 3D surface as seen in the tutorial. Copy the JSON string from a box below to the calculator's large text area. Press the Load button, then press Generate Python Script. Copy the generated Python script to Blender' text window and press the Run Script button. Simple Spiral: {"x":"1","y":"0","z":"0","u":"64","v":"1280","active":3,"mapsto":0,"matrices":[{"mat":[["cos(2*pi*u)","sin(2*pi*u)","0","0"],["-sin(2*pi*u)","cos(2*pi*u)","0","0"],["0","0","1","0"],["0","0","0","1"]]},{"mat":[["1","0","0","0"],["0","1","0","0"],["0","0","1","0"],["0","3","0","1"]]},{"mat":[["1","0","0","0"],["0","cos(20*pi*v)","sin(20*pi*v)","0"],["0","-sin(20*pi*v)","cos(20*pi*v)","0"],["0","0","0","1"]]},{"mat":[["1","0","0","0"],["0","1","0","0"],["0","0","1","0"],["0","7","0","1"]]},{"mat":[["cos(2*pi*v)","sin(2*pi*v)","0","0"],["-sin(2*pi*v)","cos(2*pi*v)","0","0"],["0","0","1","0"],["0","0","0","1"]]}]} Spinning Hypocycloid-based Spiral: {"x":"1","y":"0","z":"0","u":"65","v":"1024","active":0,"mapsto":0,"matrices":[{"mat":[["cos(-10*pi*u)","sin(-10*pi*u)","0","0"],["-sin(-10*pi*u)","cos(-10*pi*u)","0","0"],["0","0","1","0"],["4","0","0","1"]]},{"mat":[["cos(2*pi*u)","sin(2*pi*u)","0","0"],["-sin(2*pi*u)","cos(2*pi*u)","0","0"],["0","0","1","0"],["0","0","0","1"]]},{"mat":[["1+cos(20*pi*v)/3","0","0","0"],["0","1+cos(20*pi*v)/3","0","0"],["0","0","1+cos(20*pi*v)/3","0"],["0","0","0","1"]]},{"mat":[["cos(40*pi*v)","sin(40*pi*v)","0","0"],["-sin(40*pi*v)","cos(40*pi*v)","0","0"],["0","0","1","0"],["0","0","0","1"]]},{"mat":[["1","0","0","0"],["0","1","0","0"],["0","0","1","0"],["9","0","0","1"]]},{"mat":[["cos(20*pi*v)","0","sin(20*pi*v)","0"],["0","1","0","0"],["-sin(20*pi*v)","0","cos(20*pi*v)","0"],["0","0","0","1"]]},{"mat":[["1","0","0","0"],["0","1","0","0"],["0","0","1","0"],["25","0","0","1"]]},{"mat":[["cos(2*pi*v)","sin(2*pi*v)","0","0"],["-sin(2*pi*v)","cos(2*pi*v)","0","0"],["0","0","1","0"],["0","0","0","1"]]}]} Pipes: {"x":"1","y":"0","z":"0","u":"32","v":"1280","active":3,"mapsto":0,"matrices":[{"mat":[["cos(2*pi*u)","0","sin(2*pi*u)","0"],["0","1","0","0"],["-sin(2*pi*u)","0","cos(2*pi*u)","0"],["0","0","0","1"]]},{"mat":[["1","0","0","0"],["0","1","0","0"],["0","0","1","0"],["5","0","0","1"]]},{"mat":[["cos(2*pi*v)","0","sin(2*pi*v)","0"],["0","1","0","0"],["-sin(2*pi*v)","0","cos(2*pi*v)","0"],["0","0","0","1"]]},{"mat":[["1","0","0","0"],["0","1","0","0"],["0","0","1","0"],["10","0","0","1"]]},{"mat":[["cos(20*pi*v)","sin(20*pi*v)","0","0"],["-sin(20*pi*v)","cos(20*pi*v)","0","0"],["0","0","1","0"],["0","0","0","1"]]}]} Snail Shell: {"x":"1","y":"0","z":"0","u":"32","v":"128","active":2,"mapsto":0,"matrices":[{"mat":[["cos(2*pi*u)","sin(2*pi*u)","0","0"],["-sin(2*pi*u)","cos(2*pi*u)","0","0"],["0","0","1","0"],["1","0","0","1"]]},{"mat":[["sin(pi*v/2)","0","0","0"],["0","sin(pi*v/2)","0","0"],["0","0","1","0"],["0","0","0","1"]]},{"mat":[["cos(4*pi*v)","0","sin(4*pi*v)","0"],["0","1","0","0"],["-sin(4*pi*v)","0","cos(4*pi*v)","0"],["0","1.5*cos(pi*v/2)","0","1"]]}]} Patterned Sphere: {"x":"0","y":"0","z":"0.25 + sin(pi*u)*max(cos(10*pi*u+20*pi*v) -.5, cos(10*pi*u-20*pi*v) -.5)/20","u":"512","v":"512","active":1,"mapsto":0,"matrices":[{"mat":[["1","0","0","0"],["0","cos(pi*u)","sin(pi*u)","0"],["0","-sin(pi*u)","cos(pi*u)","0"],["0","0","0","1"]]},{"mat":[["cos(2*pi*v)","sin(2*pi*v)","0","0"],["-sin(2*pi*v)","cos(2*pi*v)","0","0"],["0","0","1","0"],["0","0","0","1"]]}]} Spiked Sphere: {"x":"0","y":"0","z":"0.2+sin(u*pi)*(sin(10*u*pi) * cos(20*pi*v))/20","u":"500","v":"500","active":1,"mapsto":0,"matrices":[{"mat":[["1","0","0","0"],["0","cos(1*pi*u)","sin(1*pi*u)","0"],["0","-sin(1*pi*u)","cos(1*pi*u)","0"],["0","0","0","1"]]},{"mat":[["cos(2*pi*v)","sin(2*pi*v)","0","0"],["-sin(2*pi*v)","cos(2*pi*v)","0","0"],["0","0","1","0"],["0","0","0","1"]]}]}