Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Intersection of a line and a plane

Hi,

I have a line described by points (1, 0, 1), (4, -2, 2) and a plane x + y + z = 6. If solve by hand I get the point of intersection as (7, -4, 3). But in sage, I don't find any intersection point. My code in sage is as follows:

P = Polyhedron(eqns=[(-6,1,1,1)])

L = [[1, 0, 1], [4, -2, 2]]

L1 = Polyhedron(L)

intersection = L1.intersection(P)

Output is "The empty polyhedron in QQ^3". Whats wrong here? my calculation by hand or my code?

Intersection of a line and a plane

Hi,

I have a line described by points (1, 0, 1), (4, -2, 2) and a plane x + y + z = 6. If solve by hand I get the point of intersection as (7, -4, 3). But in sage, I don't find any intersection point. My code in sage is as follows:

P = Polyhedron(eqns=[(-6,1,1,1)])

L = [[1, 0, 1], [4, -2, 2]]

L1 = Polyhedron(L)

intersection intersect = L1.intersection(P)

Output is "The empty polyhedron in QQ^3". Whats wrong here? my calculation by hand or my code?