Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
tutorial:random [2011/08/17 08:19] – [Random polytopes with are neither simplicial nor simple] joswig | tutorial:random [2017/06/12 13:45] – [Random points on the unit sphere] reduced number of points to speed up testing oroehrig | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Random points on the unit sphere ===== | ===== Random points on the unit sphere ===== | ||
- | The easiest way to randomly construct a polytope is by sampling 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 > $p1=rand_sphere(3, |
polytope > print $p1-> | polytope > print $p1-> | ||
1 | 1 | ||
Line 17: | Line 17: | ||
polytope > $p1=rand_sphere($d, | polytope > $p1=rand_sphere($d, | ||
polytope > $p2=polarize($p1); | polytope > $p2=polarize($p1); | ||
- | polytope > $p3=new Polytope(VERTICES=> | + | polytope > $p3=new Polytope(POINTS=> |
polytope > print $p3-> | polytope > print $p3-> | ||
0 0 | 0 0 | ||
30 166 264 128 | 30 166 264 128 | ||
</ | </ |