SpiroScales & LizardView; Source for Snow Leopard Available


Hah! While the NeXT system in my garage didn’t have the original BackSpace.app on it, it did have a copy of the solitaire game that my friend and I worked on.

And that had an itty bitty SpiroScale screensaver embedded in the info panel!

Imagine that full screen — all dithered and textured in 2 bit grayscale. When color NeXT systems shipped a couple of years after I wrote the screensaver, I was quite delighted with the results (as seen below)!

Solitaire was an amusing little bit of indie development. Beyond having 4 different company logos in that about panel prior to finally signing with a distributor, the eventual distribution license was a flat monthly royalty for 25 months for Adam and I.

Flat royalties work out well when the company making the hardware your software runs on stops making said hardware….

Screenalicious - SpiroScales - 200910291 233622.054.png

Some months ago, I ported an ancient screensaver of mine to Mac OS X (then Leopard) and made the binary available.

I have since ported it to Snow Leopard and have made the source available via subversion. Pre-built binaries are also available.

There are actually two bits of source there; the first is which contains the Lizard Saver and a second screen saver called Spiro Scales. The screen savers should build for both Leopard and Snow Leopard, including support for Snow Leopard’s 64 bit GC-only screensaver requirement.

The second bit of source is called Screenalicious and is a simple/stupid application for displaying a screensaver in a window and allowing you to easily take scaled down screenshots. It was a hack when I originally wrote it in the ’90s sometime and it is still a hack.

SpiroScales was my first interactive screen saver. Interactive in that the pattern generated is entirely determined by mouse position (not movement).

Screenalicious - SpiroScales - 200910291 233800.435.png

SpiroScales was first written for black&white NeXT systems (before color was available). The color picking algorithm was purely a best guess based upon how pleasant the 2-bit B&W dithering on ye olde NeXT monitor looked.

Worked out pretty well.

The algorithm is a total hack.

The screen saver effectively maintains three oscillating sets of numbers. The first two streams’ phase is influenced by mouse position. The third stream is constant, but in a different phase always from the other two.

The color is derived from these three streams of values. Specifically, the RGB values are derived from the three value streams directly.

From the first two streams — the ones influenced by mouse coordinates — a second set of two streams of numbers are created which are used as the X and Y coordinates of each point of the polygons.

Screenalicious - SpiroScales - 200910291 233915.120.png

Each polygon is rendered by grabbing 3 points from the array of points; not necessarily consecutive points, either. However, each successive polygon is made up of 2 points from the prior polygon and a new point, which yields a continuous stream of connected polygons.

Really, this writeup was just an excuse to make the post long enough to include a few screenshots that show the rather large variation possible simply by moving the mouse about the screen and letting it sit in one spot for a while.

I have 5 or 6 variations on this particular theme that I’ll gradually add to the project as time permits. And I have some other, radically different, screensavers that I ought to resurrect.

Note that all of the drawing is done with NSBezierPath because that was a nearly direct port from the original Display PostScript calls that were used. Obviously, this’d all be a boatload faster in Open GL, but I just don’t have the time to go there.

Screenalicious - SpiroScales - 200910291 234005.040.png

Note that the feedback system does exhibit pattern wells. Certain areas of the screen will exhibit certain distinct patterns that you can explore by moving the mouse pixel by pixel within that area.

Due to the way the mouse based deltas are applied, two areas of interest are the dead center of the screen. That yields lots of tiny polygons that’ll fill the screen with basket weave patterns like the previous screenshot.

The diagonals, though, will yield really long/thin polygons that, if done just right, will fill the screen with really detailed, full color, moire patterns.

Have fun!

Deprecated: link_pages is deprecated since version 2.1.0! Use wp_link_pages() instead. in /srv/www/friday/bbum/wp-includes/functions.php on line 4713

6 Responses to “SpiroScales & LizardView; Source for Snow Leopard Available”

  1. Dr. Ernie says:

    Ah, Lizard! Brings back memories. Is that, what 15 years ago?

  2. bbum says:

    Originally on the B&W Cube — so, 1990 or so. Almost twenty years!

  3. Jay Silence (jsilence) 's status on Monday, 19-Oct-09 15:24:03 UTC - Identi.ca says:

    […] http://www.friday.com/bbum/2009/10/19/spiroscales-source-for-snow-leopard-available/ a few seconds ago from xmpp […]

  4. Eric Brunstad says:

    Nice. It would be interesting to also see the NEXT code for comparison.

    Eric Brunstad

  5. bbum’s weblog-o-mat » Blog Archive » DPhyllotaxis says:

    […] the whole point of resurrecting my old screensaver code was to finally port DPhyllotaxis to Snow […]

  6. towel radiators says:

    This is one of the best stories I have ever read, I will use this in my class if thats ok with you im also going to link this blog from my site so more people see your great writing.

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>