Triangle345 / haxevoronoi

Voronoi/Delaunay triangulation Library for haxe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Haxe 100.0%