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:16] – joswig | user_guide:random [2019/01/25 09:27] – ↷ Page moved from tutorial:random to user_guide:random 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=rand_vert($p2-> | + | polytope > $p3=new Polytope(POINTS=> |
polytope > print $p3-> | polytope > print $p3-> | ||
0 0 | 0 0 | ||
30 166 264 128 | 30 166 264 128 | ||
</ | </ |