0

I am plotting a 3D point cloud on an XYZAxis with the Markers visual. In addition, I would like to plot a plane that shows how these points are separated; in this case, I have the coefficients c_0, c_1, c_2, c_3 of the plane c_0x_ + c_1y + c_2z + c_3 = 0. How can I do this? I've tried using the Plane visual, but I'm not sure how to tailor the Plane to the coefficients.

Thanks!

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712
goodcow
  • 4,495
  • 6
  • 33
  • 52

1 Answers1

0

I ended up using the SurfacePlot visual:

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)
goodcow
  • 4,495
  • 6
  • 33
  • 52