Skip to content

Triangle345/haxevoronoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haxevoronoi

Voronoi/Delaunay triangulation Library for haxe The below code should be easy to follow. Straight forward library not much explanation needed. I will try to post the haxedoc soon.

import haxevor.Point;
import haxevor.Voronoi;

var vor = new Voronoi();

pnts.push(new Point(130,140));
pnts.push(new Point(175,300));
pnts.push(new Point(205,110));
pnts.push(new Point(220,200));
pnts.push(new Point(250,185));
pnts.push(new Point(300,230));
pnts.push(new Point(400,230));
pnts.push(new Point(400,120));
pnts.push(new Point(10,5));
pnts.push(new Point(50,111));
pnts.push(new Point(400,320));

// the d. triangulation returns a list of triangles.
var dtri = vor.GenerateTriangulation(pnts);

// the voronoi generation returns voronoi cells.
// voronoi cells contain a border (list of lines) , a site point and a list of triangles.
var cells = vor.GenerateVoronoi(pnts);

alt tag

   

About

Voronoi/Delaunay triangulation Library for haxe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages