Displaying posts tagged with

“3D”

A Belated Valentine’s Day Post

This is romantic!  So listen up! A 3D heart shape may be drawn using the following implicit function: Or, in Python: def  heart_3d(x,y,z): return (x**2+(9/4)*y**2+z**2-1)**3-x**2*z**3-(9/80)*y**2*z**3 Trouble is, there is no direct way of graphing implicit functions in Python. But anything can be found on Stack Overflow. Putting it all together: #!/usr/bin/env python from mpl_toolkits.mplot3d import […]