Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The Problem is that the way you define your line above, you only get the line segment between the two indicated points. The intersection points lies however on the line outside of this segment. So try this instead to see the difference:

P = Polyhedron(eqns=[(-6,1,1,1)])
L1 = Polyhedron([[1, 0, 1], [4, -2, 2]])
L2 = Polyhedron(vertices=[[1,0,1]], rays=[[3,-2,1],[-3,2,-1]])
print L1.intersection(P)
print L2.intersection(P).vertices()

By the way: Is there an easier way of defining a complete line as a Polyhedron?