[comp.sys.mac.programmer] Moire screen saver algorithm wanted

jnelson@tle.enet.dec.com (Jeff E. Nelson) (12/01/89)

I am looking for the algorithm that is used in the Moire screen
saver to plot objects on the screen.  I don't need the calls to
draw the objects, but the code that figures out:

o  where to place the next object to be drawn, and
o  how to adjust the dimensions of the object (i.e., adjust the
   endpoints of a line segment, adjust the foci of an ellipse,
   etc.).

That is, I'm interested in the algorithim that generates the
Moire pattern.  The Moire documentation claims that the algorithm
is adopted from an unknown person who originally received it off of
a Sun source distribution of some kind or another.

Algorithms and pointers to other Moire-like pattern generating
algorithms are also appreciated.  Please post, so that others may
benefit, although I will summarize any mail I receive.

Thanks for your help.

-Jeff E. Nelson
-Digital Equipment Corporation
-Internet:  jnelson@tle.enet.dec.com
-  -or-     jnelson%tle.dec@decwrl.dec.com
-Affiliation given for identification purposes only

dudek@ai.toronto.edu (Gregory Dudek) (12/02/89)

>> I am looking for the algorithm that is used in the Moire screen
>> saver to plot objects on the screen.  I don't need the calls to
>> draw the objects, but the code that figures out:
>> [etc.]

  One quick and dirty way to get moire line segments is to just
make the endpoints bounce around the screen independently.  By
connecting these aand erasing the ones than were drawn N iterations
ago, nice moire patterns result.  You also can make the endpoints
change velocity & direction and random times instead of bouncing.

  Greg Dudek