Skip to content
Objective-C library for Delaunay Triangulation/Voronoi Diagram generation and Natural Neighbor Interpolation.
Objective-C
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
DelaunayTest Turned on ARC for DelaunayTest, and the whole Edgy project (though ev… Jun 21, 2013
Edgy Demo
Edgy DemoTests
Edgy.xcodeproj update to architectures including 64bit Dec 25, 2013
Edgy
.gitignore
README.markdown Added license info to README Jul 6, 2013

README.markdown

Edgy does 3 things:

Delaunay Triangulations

#import "DelaunayTriangulation.h"
DelaunayTriangulation *triangulation = [DelaunayTriangulation triangulationWithSize:CGSizeMake(1000, 1000)];

UITouch *touch = (UITouch *)[touches anyObject];
CGPoint loc = [touch locationInView:self.view];
DelaunayPoint *newPoint = [DelaunayPoint pointAtX:loc.x andY:loc.y];
[self.triangulation addPoint:newPoint];

Voronoi Diagrams

NSDictionary *voronoiCells = [self.triangulation voronoiCells];

Natural Neighbor Interpolation

UITouch *touch = (UITouch *)[touches anyObject];
CGPoint loc = [touch locationInView:self.view];
DelaunayPoint *newPoint = [DelaunayPoint pointAtX:loc.x andY:loc.y];
[self.triangulation interpolateWeightsWithPoint:newPoint];

After interpolateWeightsWithPoint is called, each DelaunayPoint in the DelaunayTriangulation object's points set will have a contribution property that is between [0, 1] and represents the weight of that point's contribution to the output at the interpolated point.

License

Code is under the Creative Commons Attribution 3.0 Unported license.

Something went wrong with that request. Please try again.