Surprisingly easy! Here’s an ellipsoid:
Generated from this depthmap:
To write this relatively simple bit of code I referred to wikipedia’s description and flothesof’s python code.