from k3d import K3D
view_matrix = (
0.9, 0.1, -0.4, 0.0,
0.0, 0.9, 0.4, 0.0,
0.4, -0.4, 0.9, 0.0,
0.0, 0.0, 0.0, 1.0
)
positions = (
-10.0, -15.0, 0.0,
-10.0, 5.0, 0.0,
10.0, 5.0, 0.0,
-10.0, -15.0, 0.0,
10.0, -15.0, 0.0,
-10.0, 5.0, 0.0,
0.0, 15.0, 0.0,
10.0, 5.0, 0.0,
10.0, -15.0, 0.0
)
lines = K3D.line(positions, view_matrix=view_matrix, color=0xff0000, width=2.5) + K3D.line((0, 0, 0, 5, 10, 15))
plot = K3D(antialias=True)
plot += lines
plot.display()