Categorygithub.com/csweichel/go-pen
module
0.0.0-20220123184124-9d211ebc458e
Repository: https://github.com/csweichel/go-pen.git
Documentation: pkg.go.dev

# README

logo

go-pen is a simple generative art framework for pen plotter. It supports

  • live-reload/preview of plotter programs
  • basic geometries: lines, arcs and bezier curves
  • vector fields, including perlin noise generated ones
  • PNG output
  • SVG output
  • Gcode output

Try it out

Open in Gitpod

Getting started

# install goplot CLI
go install github.com/csweichel/go-pen/cmd/gopen@latest

# create a new sketch
mkdir my-sketches
gopen init my-sketches/hello-world

# start live-preview
gopen preview my-sketches/hello-world/main.go

Generate gcode

All go-pen sketches are self-contained Go programs and can be executed as such. To generate gcode from a sketch just run that sketch:

# print the CLI help
go run example/field/main.go --help

# generate gcode
# Tip: inspecting the gcode is easy with https://icesl.loria.fr/webprinter/
go run example/field/main.go --output field.gcode --device gcode --device-opts example/gcode-opts.json

Notice the --device-opts flag which enables output device configuration. For gcode, this struct defines the available options.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author