Skip to content

ngocdvspace/convexhull

Repository files navigation

Convex Hull using Graham's Scan

This package implements Graham's scan in order to find the convex hull of a given set of points in a Euclidean plane.

Usage

Points containing an X and Y coordinate, along with a slice type for Points, are defined as follows:

type Point struct {
	X, Y float64
}

type PointSlice []Point

Graham's scan takes a PointSlice and returns a PointSlice containing the Points contained by the convex hull. Example:

MyConvexHull := convexhull.GrahamScan(MyPointSlice)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages