Macaulay2 » Documentation
Packages » OldPolyhedra :: crossPolytope
next | previous | forward | backward | up | index | toc

# crossPolytope -- computes the d-dimensional crosspolytope with diameter 2s

- Usage:
    `P = crossPolytope(d,s)`
- Inputs:
  - d, an integer, strictly positive
  - s, ZZ or QQ, positive (optional)
- Outputs:
  - P, a convex polyhedron

## Description

The d-dimensional crossPolytope with diameter s is the convex hull of +/- s times the standard basis in QQ^d. If s is omitted it is set to 1.

    i1 : P = crossPolytope(3,3/2)

    o1 = {ambient dimension => 3           }
          dimension of lineality space => 0
          dimension of polyhedron => 3
          number of facets => 8
          number of rays => 0
          number of vertices => 6

    o1 : Polyhedron

    i2 : vertices P

    o2 = | -3/2 3/2 0    0   0    0   |
         | 0    0   -3/2 3/2 0    0   |
         | 0    0   0    0   -3/2 3/2 |

                  3       6
    o2 : Matrix QQ  <-- QQ

## Ways to use crossPolytope:

- `crossPolytope(ZZ)`
- `crossPolytope(ZZ,QQ)`
- `crossPolytope(ZZ,ZZ)`

## For the programmer

The object crossPolytope is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/OldPolyhedra.m2:7416:0.