mcpi
provides a simple interface to draw (x,y)
points for a Monte-Carlo approximation method to compute Pi.
mcpi
starts a web server that will listen for plot requests.
Installation is done with go get
:
$> go get github.com/master-pfa-info/mcpi
func main() {
mcpi.Wait()
mcpi.Plot(0,0)
mcpi.Plot(0.5, 0.5)
mcpi.Quit()
}
$> go run ./main.go
2017/09/19 17:27:44 listening on 127.0.0.1:46191
and then direct your favorite web-browser to the indicated URL.