Skip to content

Short PostScript programs to make fractals as vector graphics for CNC machines, laser cuters, vinyl cutters, etc

Notifications You must be signed in to change notification settings

steiza/postscript_fractals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PostScript Fractals

There have never been more consumer-accessible CNC-like machines:

  • Laser cutters / engravers
  • Vinyl cutters
  • 3D printers
  • CNC routers
  • Plasma cutters (a bit of a stretch, but check your local makerspace)

Many of these machines work best with vector graphics, and there are plenty of vector graphic programs for drawing things manually. But what if you want to create something intricate and repetitive, like a fractal?

Enter PostScript, a decades-old stack-based extra-hyphenated programming language that's perfect for defining recursive fractals.

For example, take clamshell.eps. If you change the last line to be:

500 1 DARK_TRAPAZOID

... and rendering it to a PDF (on *nix anyways):

ps2pdf clamshell.eps clamshell1.pdf

... you get a small fractal:

http://raw.github.com/steiza/postscript_fractals/master/rendered/clamshell1.png

But if you crank up the recursion by changing the last line to be:

500 5 DARK_TRAPAZOID

... you get something much more complex:

http://raw.github.com/steiza/postscript_fractals/master/rendered/clamshell.png

More correctly, these are actually aperiodic tilings there are built using substitution rules, and there are a lot of them.

http://raw.github.com/steiza/postscript_fractals/master/rendered/canonical3.png

So download this repo, make some fractals, and put them on stuff!

http://raw.github.com/steiza/postscript_fractals/master/rendered/closet.jpg

About

Short PostScript programs to make fractals as vector graphics for CNC machines, laser cuters, vinyl cutters, etc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published