Implicit equation and Mayavi
问题 How to plot implicit equation F(x,y,z)=0 with Mayavi? I tried with import scipy as np x, y, z = np.mgrid[-3:3:100j, -3:3:100j, -3:3:100j] F = x**2/3**2 + y**2/2**2 + z**2/4**2 - 1 from enthought.mayavi import mlab mlab.contour3d(F) mlab.show() but I don't get a part of ellipsoid. If I use parametrization and mesh then it's ok, but don't know how to plot it implicitly. 回答1: Use contours = [0] to get the surface F(x,y,z) = 0 : import numpy as np from enthought.mayavi import mlab x, y, z = np