Haskell, PDF and Penrose Tilings

I am currently learning Haskell and the only way to learn a programming language is coding. So, I decided to write a PDF library.

Why PDF ? On a Mac, PDF is a cool format which can be easily used in any application. And the rendering is good. Moreover, I have had problems with other graphic library for Haskell : problems to build them on a Mac or not beautiful rendering.

You can get the package with:

darcs get http://darcs.alpheccar.org/HPDF

It is not Mac specific. You can build it on Windows and any Unix.

It is containing everything : documentation, Cabal configuration files and a test program. The test program is generating Penrose tilings (if my understanding of the article I read was good. It may be wrong but the result looks like Penrose tilings very much). Here is an example:

The library is very experimental since i wrote it mainly to learn. I have not implemented all PDF operators. It is very easy to add new ones and with the current supported subset it is already possible to have lot of fun.

I have attached an example PDF to this post too.

UPDATE : I have updated the library in the darcs repository. I removed a space leak, added support for transparency and clipping and cleaned a bit the API.

(This post was imported from my old blog. The date is the date of the import. The comments where not imported.)

blog comments powered by Disqus