Source

QuasiCrystalScreenSaver /

Filename Size Date modified Message
English.lproj
QuasiCrystalScreenSaver.xcodeproj
74 B
890 B
983 B
942 B
49.7 KB
1.4 KB
8.9 KB
218 B
3.1 KB
457 B
QuasiCrystalScreenSaver

What is this?
-------------

It is a screensaver that displays patterns based on quasicrystals.

See http://en.wikipedia.org/wiki/Quasicrystal

How can I use it?
-----------------

Download prebuilt binary:
1. Download the latest from http://bitbucket.org/rallen/quasicrystalscreensaver/downloads/
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: http://mainisusuallyafunction.blogspot.com/2011/10/quasicrystals-as-sums-of-waves-in-plane.html

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: 
http://news.ycombinator.com/item?id=3153835

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.
http://zokier.net/stuff/webgl-quasicrystal/

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:
http://zokier.net/stuff/webgl-quasicrystal/color.html

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:

http://cocoadevcentral.com/articles/000088.php and
http://cocoadevcentral.com/articles/000089.php

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 rallen@gmail.com.

License (GPL)
-------------

Copyright (C) 2011 Roger Allen (rallen@gmail.com)

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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
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.