Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
user_guide:tutorials:master:random [2019/04/12 04:41] – external edit 127.0.0.1 | user_guide:tutorials:master:random [2020/05/12 05:00] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
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 following chooses 100 points on the units sphere in 3-space. | + | The easiest way to randomly construct a polytope is by sampling points on the unit sphere. The following chooses 100 points on the unit sphere in 3-space. |
<code perl> | <code perl> | ||
Line 10: | Line 10: | ||
true | true | ||
</ | </ | ||
- | With probability one such polytopes are simplicial. | + | ===== Random points sampled from a normal distribution ===== |
+ | |||
+ | A second way to randomly construct a polytope is by sampling points by a standard normal distribution. The following chooses 100 points sampled from the standard normal distribution in 3-space. | ||
+ | |||
+ | <code perl> | ||
+ | > $p2 = rand_normal(3, | ||
+ | > print $p2 -> SIMPLICIAL, " | ||
+ | true | ||
+ | 24 66 44 | ||
+ | </ | ||
+ | With probability one such polytopes | ||
===== Random polytopes with are neither simplicial nor simple ===== | ===== Random polytopes with are neither simplicial nor simple ===== | ||
Line 21: | Line 31: | ||
> print $p3-> | > print $p3-> | ||
false false | false false | ||
- | 30 163 256 123 | + | 30 162 251 119 |
</ | </ | ||