QuasiCrystalScreenSaver / README.txt


What is this?

It is a screensaver that displays patterns based on quasicrystals.


How can I use it?

Download prebuilt binary:
1. Download the latest from
2. Double-click on the Products/QuasiCrystal.saver, and it should bring
   up the SystemPreferences/ScreenSaver app.
3. Enjoy!

To Build:
1. Grab the source 
2. Open the QuasiCrystalScreenSaver.xcodeproj in Xcode
3. Build -> Build
4. Double-click on the Products/QuasiCrystal.saver, and it should bring 
   up the SystemPreferences/ScreenSaver app.
5. Enjoy!

Why did you do this?

I was reading HackerNews the morning of October 25, 2011 & came across this 
interesting post:

A haskell hacker made this by summing up rotated sine waves. I was pretty
mesmerized (hypnotized?) by those images.  They were beautiful.  But storing 
images and animating them is so 1980s. I thought it could be done via WebGL 
as a realtime pixel shader. So, I said so on the comment thread:

45 minutes later someone implemented one version, but it wasn't quite the same. 
Then, in about another hour or two, a much better version appeared.

Playing with the code at lunchtime, I pointed out he could get rid of some 
flashing artifacts using 3x3 supersampling and he took that + a colormap and created:

I couldn't leave well enough alone.  The pattern was too mesmerizing and I 
wanted to write a screensaver.  I did this with some trepidation as I am not much 
of a Mac/Obj-C coder.  But, I found these tutorials: and

They were very easy to follow and got some OpenGL code quickly doing the right thing.  
But, finding the code to get Vertex and Fragment shaders going was not as simple.  I 
know the basics but the details are always infuriating.  Debugging OpenGL is just 
not fun.  But, as night and day of googling later, I finally got it working.

What's next?

Well, I'm releasing it.  We'll see where this goes.  Send email to

License (GPL)

Copyright (C) 2011 Roger Allen (

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.