Ask Your Question

random polytopes

asked 2015-10-07 21:46:55 -0500

Hi there,

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

Thanks, Guillermo

edit retag flag offensive close merge delete



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

FrédéricC gravatar imageFrédéricC ( 2015-10-08 02:47:56 -0500 )edit

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.

jipilab gravatar imagejipilab ( 2018-05-02 08:35:48 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2015-10-08 08:47:58 -0500

fidbc gravatar image

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.

dim = 3
P=Polyhedron( vertices=[ [randint(m,M) for i in range(dim)] for i in range(100)])
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2015-10-07 21:46:55 -0500

Seen: 39 times

Last updated: Oct 08 '15