Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:random [2011/08/17 08:19] – [Random polytopes with are neither simplicial nor simple] joswig | user_guide:tutorials:random [2019/02/04 22:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Random Constructions ====== | + | {{page> |
- | ===== Random points on the unit sphere ===== | ||
- | |||
- | The easiest way to randomly construct a polytope is by sampling points on the unit sphere. | ||
- | < | ||
- | polytope > $p1=rand_sphere(3, | ||
- | polytope > print $p1-> | ||
- | 1 | ||
- | </ | ||
- | With probability one such polytopes are simplicial. | ||
- | |||
- | ===== Random polytopes with are neither simplicial nor simple ===== | ||
- | |||
- | < | ||
- | polytope > ($d,$m,$n) = (4,50,30); | ||
- | polytope > $p1=rand_sphere($d, | ||
- | polytope > $p2=polarize($p1); | ||
- | polytope > $p3=new Polytope(VERTICES=> | ||
- | polytope > print $p3-> | ||
- | 0 0 | ||
- | 30 166 264 128 | ||
- | </ |