Ask Your Question
0

CUBE+PLANES = POLYHEDRONS

asked 2012-07-31 16:21:52 +0100

mfa gravatar image

updated 2015-01-13 20:35:11 +0100

FrédéricC gravatar image

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?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2012-07-31 22:30:20 +0100

mfa gravatar image

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?

edit flag offensive delete link more

Comments

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

Volker Braun gravatar imageVolker Braun ( 2012-08-01 22:18:54 +0100 )edit

may not explain well . I have a polyhedron and I need to cut it with several planes and I want to count the number of generated polihedros and I also need to draw

mfa gravatar imagemfa ( 2012-08-02 22:33:47 +0100 )edit
0

answered 2012-07-31 18:56:51 +0100

Volker Braun gravatar image

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
edit flag offensive delete link more

Comments

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

mfa gravatar imagemfa ( 2012-08-01 13:39:52 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-07-31 16:21:52 +0100

Seen: 523 times

Last updated: Jul 31 '12