Turtle graphics for Golang using image.RGBA
i := image.NewRGBA(image.Rect(0, 0, 300, 300))
t := terrapin.NewTerrapin(i, terrapin.Position{150.0, 150.0})
t.Forward(100)
t.Right(math.Pi * 1 / 2)
t.Forward(100)
t.Right(math.Pi * 3 / 4)
t.Forward(math.Hypot(100, 100))
png.Encode(writer, i)
To see a couple of little examples:
go get github.com/holizz/terrapin
go run $GOPATH/src/github.com/holizz/terrapin/example/main.go
MIT (see LICENSE.txt)