-1

这是用于生成 Mobius 条的 Octave/Matlab 代码。

u = linspace(0,2*pi,100);
v = linspace(-1.0,1.0,100);
[u,v] = meshgrid(u,v);

x = (1+v.*cos(u/2)).*cos(u);
y = (1+v.*cos(u/2)).*sin(u);
z = v.*sin(u/2);

plot3(x,y,z)

输出如下。在这里,条带,我需要边缘坐标(XYZ)。如何获得边缘的 XYZ 坐标?

莫比乌斯带

4

2 回答 2

0
plot3(x([1 end],:).',y([1 end],:).',z([1 end],:).', "b")

输出

于 2018-10-20T15:34:18.537 回答
0

我可以使用 python 来做到这一点,如下所示。在此处查看相关帖子

bLength=1.6
numPoints=10
radius = bLength*numPoints / (2 * np.pi)
theta = np.linspace(0,2*np.pi,numPoints,endpoint=False)
dtheta=theta[1]-theta[0]

x0,y0=(radius * np.cos(theta)), (radius * np.sin(theta))
x1,y1=(radius * np.cos(theta+dtheta/2)) , (radius * np.sin(theta+dtheta/2))
cons0=np.ones(x0.shape)*0
cons1=np.ones(x1.shape)*2

np.savetxt('cooRing00.csv',np.c_[x0,y0,cons0],delimiter=' ',fmt='%10f')
np.savetxt('cooRing01.csv',np.c_[x1,y1,cons1],delimiter=' ',fmt='%10f')
于 2019-02-28T14:46:58.043 回答