【发布时间】:2018-03-02 22:05:39
【问题描述】:
我正在使用 Markers 视觉对象在 XYZAxis 上绘制 3D 点云。另外,我想绘制一个平面来显示这些点是如何分开的;在这种情况下,我有平面c_0x_ + c_1y + c_2z + c_3 = 0 的系数c_0, c_1, c_2, c_3。我怎样才能做到这一点?我尝试使用 Plane 视觉效果,但我不确定如何根据系数调整 Plane。
谢谢!
【问题讨论】:
我正在使用 Markers 视觉对象在 XYZAxis 上绘制 3D 点云。另外,我想绘制一个平面来显示这些点是如何分开的;在这种情况下,我有平面c_0x_ + c_1y + c_2z + c_3 = 0 的系数c_0, c_1, c_2, c_3。我怎样才能做到这一点?我尝试使用 Plane 视觉效果,但我不确定如何根据系数调整 Plane。
谢谢!
【问题讨论】:
我最终使用了SurfacePlot 视觉效果:
coefs = np.array([-10.07375729, 15.61272995, 2.45089647, 33.58025209])
xx = np.linspace(0, 1, 10)
yy = np.linspace(0, 1, 10)
YY, XX = np.meshgrid(yy, xx)
z = (-coefs[1] * XX- coefs[2] * YY - coefs[0]) * 1. /coefs[3]
plane = SurfacePlot(x=xx, y=yy, z=z, color=(0.3, 0.3, 1, 1), parent=view.scene)
【讨论】: