# CUBE+PLANES = POLYHEDRONS

I have an cube and an collention of planes ( normal and one point, Ax = b ). how can I get the polyhedrons formed by the intersection of the cube and the planes?

CUBE+PLANES = POLYHEDRONS

add a comment

0

Define the cube as a polyhedron (its a canned example):

```
sage: cube = polytopes.n_cube(3)
sage: cube.Hrepresentation()
(An inequality (0, 0, -1) x + 1 >= 0, An inequality (0, -1, 0) x + 1 >= 0, An inequality (-1, 0, 0) x + 1 >= 0, An inequality (1, 0, 0) x + 1 >= 0, An inequality (0, 0, 1) x + 1 >= 0, An inequality (0, 1, 0) x + 1 >= 0)
```

Define the plane as a polyhedron:

```
sage: plane = Polyhedron(eqns=[(0,1,0,0)])
sage: plane.Hrepresentation()
(An equation (1, 0, 0) x + 0 == 0,)
```

Compute the intersection:

```
sage: cube.intersection(plane)
A 2-dimensional polyhedron in QQ^3 defined as the convex hull of 4 vertices
```

0

Thanks for the reponse: in the above solution, the plane intersects or cut to the cube generating two polyhedra, so how could get these polihedros to manipulate?

I don't understand your question. The intersection of two convex sets is always a single convex set (perhaps empty).

Asked: **
2012-07-31 09:21:52 -0500
**

Seen: **209 times**

Last updated: **Jul 31 '12**

generating an array of convex polyhedrons

Compute the centroid of a polytope

What is the most efficient way to "look up" a face in the face lattice of a polyhedron?

force 0/1 in V-representation of a set of inequalities

Display x-intercept of a plot, involving x raised to the 3rd power.

Ordered list of vertices of polygon

Parallelizing Polyhedral volume computation

Can I intersect the boundaries of two polyhedra and display it?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.