Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revisionBoth sides next revision | ||
tutorial:random [2011/08/04 07:58] – created joswig | user_guide:random [2019/01/25 09:27] – ↷ Page moved from tutorial:random to user_guide:random oroehrig | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Random Constructions ====== | ====== Random Constructions ====== | ||
+ | |||
+ | ===== 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 ===== | ===== Random polytopes with are neither simplicial nor simple ===== | ||
Line 7: | Line 17: | ||
polytope > $p1=rand_sphere($d, | polytope > $p1=rand_sphere($d, | ||
polytope > $p2=polarize($p1); | polytope > $p2=polarize($p1); | ||
- | polytope > $p3=rand_vert($p1-> | + | polytope > $p3=new Polytope(POINTS=> |
polytope > print $p3-> | polytope > print $p3-> | ||
0 0 | 0 0 | ||
30 166 264 128 | 30 166 264 128 | ||
</ | </ |