go-convexhull

command module
v0.0.0-...-7dae096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2014 License: MIT Imports: 5 Imported by: 0

README

go-convexhull

Implementation of Graham Scan in GO with visualization

SS

How to Use

  • Use mouse to add points on the screen. The hull is computed everytime a point is added.
  • Press 'H' to draw the hull.
  • Press 'C' to clear the points.

Building (OSX)

Ensure that GO is installed. I'm assuming you're using brew in OSX.

Install GLEW

brew install glew

pkg-config glew --cflags --libs
//Keep a note of the include and libs for GLEW

Compile & Install Go GL

cd ~/go/src/github.com
git clone https://github.com/go-gl/gl.git
cd go-gl/gl

CGO_CFLAGS="-I/usr/local/Cellar/glew/1.11.0/include/" CGO_LDFLAGS="-L/usr/local/Cellar/glew/1.11.0/lib" go install

Build and Run go-convexhull

cd go-convexhull
go get
go get ./convexhull
go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Stack implementation from https://gist.github.com/bemasher/1777766
Stack implementation from https://gist.github.com/bemasher/1777766

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL