需要解释用于使用matplotlib绘制椭圆体

时间:2014-09-04 06:41:12

标签: python numpy matplotlib

此问题直接引用Plotting Ellipsoid with Matplotlib

我需要在4维或更高维度上建模椭球。

我需要理解上述问题的答案,以便我可以扩展它来解决我的问题。这些代码行如何工作:

# Cartesian coordinates that correspond to the spherical angles:
# (this is the equation of an ellipsoid):
x = rx * np.outer(np.cos(u), np.sin(v))
y = ry * np.outer(np.sin(u), np.sin(v))
z = rz * np.outer(np.ones_like(u), np.cos(v))

我需要答案:如何选择cos(u)和sin(v)等?

提前致谢。

0 个答案:

没有答案