user_guide:tutorials:voronoi

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:voronoi [2017/05/22 19:44] – added some formatting to enable automated tests oroehriguser_guide:tutorials:voronoi [2019/02/04 22:55] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Voronoi Diagrams ====== +{{page>.:latest:@FILEID@}}
- +
-Voronoi diagrams are constructed from their sites (given in homogeneous coordinates). +
-<code> +
-polytope > $VD = new VoronoiDiagram(SITES=>[[1,1,1],[1,0,1],[1,-1,1],[1,1,-1],[1,0,-1],[1,-1,-1]]); +
-polytope > $VD->VISUAL_VORONOI; +
-</code> +
- +
-Actually, via lifting to the standard paraboloid, Voronoi diagrams are derived from ''Polytope'' That's why they have ''VERTICES'', ''FACETS'', and such. +
- +
-<code> +
-polytope > print $VD->FACETS; +
-2 -2 -2 1 +
-1 0 -2 1 +
-2 2 -2 1 +
-2 -2 2 1 +
-1 0 2 1 +
-2 2 2 1 +
-1 0 0 0 +
- +
-polytope > print $VD->VERTICES; +
-0 0 1 2 +
-0 1 0 2 +
-1 1/2 0 -1 +
-0 -1 0 2 +
-0 0 -1 2 +
-1 -1/2 0 -1 +
-</code>+
  
  • user_guide/tutorials/voronoi.1495482297.txt.gz
  • Last modified: 2017/05/22 19:44
  • by oroehrig