Пример #1
0
fig = plt.figure()
ax = fig.add_subplot(111,projection='3d')

pi = np.pi

seg = Segment()

seg.bend_angle = pi/2
seg.bend_direction = 3*pi

rotvec = [0,0,1]

seg.apply_rotvec(rotvec,[1,0,0])


x = seg.bend_line(rotvec)
ax.plot(x[0],x[1],x[2],color='black')

c = magpy.Collection(seg.magnet)
magpy.displaySystem(c,subplotAx=ax,suppress=True)

ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
'''
ax.set_xlim(-200,200)
ax.set_ylim(-200,200)
ax.set_zlim(-200,200)
'''
plt.show()