Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 NumPy 制作椭圆体?
我有一个球体是这样的:
def sphere() R = 25 xx, yy, zz = np.mgrid[:100, :100, :100] return ((xx - 50) ** 2 + (yy - 50) ** 2 + (zz - 50)) < R**2
我想将其推广到一个椭圆体,理想情况下它可以有任何旋转。
试试看这里,我不确定这是否是你需要的Ellipsoid类。