Ask Your Question

Revision history [back]

Let me change the perspective: if you want to project a polytope (or apply watever any map), you should probably directly apply a matrix to your polytope, for example:

sage: D = polytopes.dodecahedron()
sage: M = matrix([[0,1,0],[0,0,1]])
sage: M * D
A 2-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?)^2 defined as the convex hull of 6 vertices
sage: (M * D).plot()

Let me change the perspective: if you want to project a polytope (or apply watever any map), map to it), you should probably can directly apply a matrix to your polytope, for example:

sage: D = polytopes.dodecahedron()
sage: M = matrix([[0,1,0],[0,0,1]])
sage: M * D
A 2-dimensional polyhedron polyhedron
in (Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?)^2 2.236...?)^2
defined as the convex hull of 6 vertices
sage: (M * D).plot()

Let me change the perspective: to project a polytope (or apply any linear map to it), you can directly apply a matrix to your polytope, for example:

sage: D = polytopes.dodecahedron()
sage: M = matrix([[0,1,0],[0,0,1]])
sage: M * D
A 2-dimensional polyhedron
in (Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236...?)^2
defined as the convex hull of 6 vertices
sage: (M * D).plot()