Clone wiki

QuasiCrystalScreenSaver / Home


What is this?

It is a Macintosh screensaver that displays patterns based on quasicrystals using OpenGL.

See some screenshots here. For more info on Quasicrystals, there is always Wikipedia

What is new?

The 120317 release adds:

  • a fixed "Hutchins" color scheme. I went back and looked at an example image from Ed and it was much different than the previous release. This update gets something much closer to what Ed intended. I'm not positive it is all the way there, but it is certainly much closer.
  • a "Primary Riff" variant of Ed's shader. I found this while trying to repro Ed's shader & liked it enough to keep it around.

The 120312 release adds:

  • a "Hutchins" color scheme. This came from via my friend Ed Hutchins.
  • a control for "symmetry". The default used to be 7 and you couldn't change it. Now you can vary it from 1 to 19. I was going to get to this eventually, but Ed beat me to it.

The 111219 release adds:

  • Color! Now you can select different color schemes instead of just grey.

The 111027 release:

  • is the original binary release of QuasiCrystal

How can I use it?

Either download a prebuilt binary:

  1. Download the latest from
  2. Double-click on the Products/QuasiCrystal.saver, and it should bring up the SystemPreferences/ScreenSaver app. Look for the folder "Other" and QuasiCrystal should be listed.
  3. Enjoy!

Or build it yourself:

  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. Look for the folder "Other" and QuasiCrystal should be listed.
  5. Enjoy!

Be sure to play with the sliders by clicking the "Options..." button. Find the configuration you like best.

Please note is that this software requires a modern GPU. If the preview in the ScreenSaver does not animate smoothly and looks like a slideshow, you will be disappointed. Don't go to the fullscreen view if the preview is a slideshow. You will be frustrated as you struggle to get control of your machine (holding down a key worked for me). Sorry about that, but you will need more GPU power to appreciate this.

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 this.

I couldn't leave well enough alone. The pattern was too mesmerizing and I decided 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: one and two.

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.