3D Printer Gosper Curve

by marcelrr in Workshop > 3D Printing

49 Views, 0 Favorites, 0 Comments

3D Printer Gosper Curve

Screenshot 2024-05-07 at 8.31.55 AM.png

A Gosper Curve, 3d printed through a custom g-code compiled with p5.fab.

Supplies

Software: p5.fab. Hardware: Ender 3 Pro 3D printer. Material: PLA.

Research

Screenshot 2024-05-07 at 8.32.20 AM.png
1920px-Gosper_curve_3.svg.png

I wanted to create an object from a single curve that would create a space filled object compact enough to fit on the 3D printer bed with some detail. The Gosper Curve's nature of expanding in a sort of radial way as opposed to out along some axis made it conducive to this goal.

Printer Functions

Screenshot 2024-05-07 at 8.42.40 AM.png

The first step would be to understand the way that p5.fab compiles g-code from the p5.js java language. Using the library as a reference, I created functions which would achieve the normal processes in initializing, starting, and stopping a print.

Generating the Curve

Screenshot 2024-05-07 at 8.43.05 AM.png

These functions generated and rendered the Gosper Curve. Using the rule set expressed in the Wikipedia article, a string was produced. The letters "A" and "B" signify a step forward, while the symbols "+" and "-" signify a turn of 60 and -60 degrees respectively. The recursive nature of the curve, means that a variable order should be defined, which means that each letter "A" and "B" will be replaced by more instructions, possibly to infinity. In this case, an order of 4 was defined to contain the curve to the printer bed. The renderer then executes the instructions in a way which adheres to p5.fab's path generation.