Skip to content
Go 3D Print
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
base-image Update config format Apr 19, 2019
img go3dprint Apr 8, 2019
mesh Clean up Dockerfiles Apr 19, 2019
render Merge branch 'master' into gotest Apr 19, 2019
web Update main.go May 9, 2019
.gardenignore go3dprint Apr 8, 2019
.gitignore go3dprint Apr 8, 2019 Update Apr 29, 2019
garden.yml Update config format Apr 19, 2019


go3dprint is a needlessly distributed phallic object generator.

It's an educational demo project made to showcase the basics of creating and rendering 3D mesh with Go. It uses the sdfx and fauxgl libraries.

This project was presented at dotGo 2019, in Paris.

For the live demo a simpler version was used. This is the "full version," which has the following key differences:

  • Functionality is split into loosely coupled microservices
  • Running as lightweight containers
  • That communicate via API calls and websockets.

And thanks to Garden, the workflow is configured so that it:

  • Re-builds and re-deploys on every code change
  • Can use hot reload, so containers can be update without restarting
  • Uses the same tooling for all environments—local, CI, remote.

The differences and the conversion process are explained in detail in the article Needlessly Distributed Phallic Object Generator.

How It Works

This project is split into three microservices: mesh, render, and web.

The way it works is:

  • web constantly polls mesh for 2D and 3D objects.
  • If it receives a 2D object, it displays it on the browser.
  • If it receives a 3D object, it POSTs it to the render service.
  • The render service, in turn, returns an image of the rendered mesh, which is then displayed on the browser.

To enable live feedback as one explores different 2D/3D forms, this project uses Garden to re-build and re-deploy services whenever the source code changes.

Simply install Garden, clone this repository, and garden dev.


  1. Install Garden (this project requires version 0.9.10 or later)
  2. Clone this repo
  3. Run garden dev --hot=mesh, and leave it running.
  4. Add garden.local to your /etc/hosts file and point it to your local Kubernetes cluster.
  5. You should see the ingress endpoint for the web service in the output. Open that in your browser.
  6. Now go and mess around! Open mesh/main.go and look for the commented out lines in the magic() function. Try uncommenting the sections one by one and observe the results in the browser (it takes a few seconds to rebuild each time).

You can’t perform that action at this time.