0
我在3D空間中有一系列點,當前繪圖。我想將它們連接在一起形成一個矩形。矩形將需要一定的寬度和高度,並且如果遇到框邊界,應該以某種方式'圍繞'到框的另一側。用線條/條連接3D點
我的代碼如下:
import matplotlib.pyplot as pyplot
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
x = [0, 0, 0, 0, 50, 50, 50, 50]
y = [50,50,50,50,50,50,50,50]
z = [12.5,37.5,62.5,87.5,25,50,75,0]
fig = pyplot.figure()
ax = fig.add_subplot(111, projection = '3d')
ax.set_xlim(0,100)
ax.set_ylim(0,100)
ax.set_zlim(0,100)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
#ax.view_init(elev=90, azim=90)
ax.scatter(x, y, z, zdir='z', s=20, c='g')
pyplot.show()
沒有任何人有什麼想法?非常感謝