user_guide:tutorials:master:random

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
user_guide:tutorials:master:random [2020/03/25 16:17] joswiguser_guide:tutorials:master:random [2026/09/17 12:17] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
 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. 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>
 > $p1=rand_sphere(3,100); > $p1=rand_sphere(3,100);
Line 10: Line 9:
 true true
 </code> </code>
-With probability one such polytopes are simplicial.+===== Random points sampled from a normal distribution =====
  
-===== Random polytopes which are neither simplicial nor simple =====+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, 100); 
 +> print $p2 -> SIMPLICIAL, "\n", $p2 -> F_VECTOR; 
 +true 
 +24 66 44 
 +</code> 
 +With probability one such polytopes under either distribution are simplicial.
  
 +===== Random polytopes with are neither simplicial nor simple =====
 <code perl> <code perl>
 > ($d,$m,$n) = (4,50,30); > ($d,$m,$n) = (4,50,30);
Line 21: Line 28:
 > print $p3->SIMPLICIAL, " ", $p3->SIMPLE, "\n", $p3->F_VECTOR; > print $p3->SIMPLICIAL, " ", $p3->SIMPLE, "\n", $p3->F_VECTOR;
 false false false false
-30 163 256 123+30 162 251 119
 </code> </code>
  
  • user_guide/tutorials/master/random.1585153037.txt.gz
  • Last modified: 2020/03/25 16:17
  • by joswig