Processing Snippets

Lately I have been working on half-tones generation with processing, mainly to use with my home-made printer (I am still working on vectorial drawing, but it's a little harder).

So here are two snippets of code.

The first one is pretty basic, but the point is to let you chose what shape do you want to use so I commented it in order to be very easily understandable.

The second one uses a very specific pattern that I really love. I saw it used on the sestemantics website, for the van Bergen Kolpa website. Here is a demo: 

131022_140318.png

You can download them here . One of the good things is that the output file is a vector PDF so you can manipulate it in Illustrator (or Inkscape if you want to stay open source)!