# random polytopes

Hi there,

Is there an easy way to generate random d-polytopes?

Thanks, Guillermo

random polytopes

Hi there,

Is there an easy way to generate random d-polytopes?

Thanks, Guillermo

1

FrédéricC was right, it is easy enough. This tutorial was helpful too. You can tweak the example below to your suit your needs.

```
m=-5
M=5
dim = 3
P=Polyhedron( vertices=[ [randint(m,M) for i in range(dim)] for i in range(100)])
```

Asked: **
2015-10-07 21:46:55 -0600
**

Seen: **40 times**

Last updated: **Oct 08 '15**

Generating random normal vectors and matrices

Triangulation of Lattice Polytope

Forming a polytope from only its combinatorial data

Speed comparison with numerical arrays: sage, R, matlab

Problem calling np.random.multinomial from notebook

Randomly generated simple polytopes with given number of vertices

Is it possible to compute the face lattice of a polytope from its vertex-facet incidences?

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.

Well, you can generate random points and take their convex hull. This should be easy enough.

Note that generating random d-polytopes is a sensitive thing to do: you end up with probability 1-epsilon with a simplicial polytope, which may or may not be what you want to have.