home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.mac.misc:19097 comp.sys.mac.apps:17114
- Newsgroups: comp.sys.mac.misc,comp.sys.mac.apps
- Path: sparky!uunet!stanford.edu!bcm!aio!mark@cheers.jsc.nasa.gov
- From: mark@cheers.jsc.nasa.gov (Mark Manning)
- Subject: Re: anyone know how "Satori" works on the "After Dark" porogram?
- Message-ID: <1992Nov12.162102.24725@aio.jsc.nasa.gov>
- Sender: news@aio.jsc.nasa.gov (USENET News System)
- Organization: Simulacron I
- References: <1992Nov11.121326.17348@husc3.harvard.edu>
- Distribution: usa
- Date: Thu, 12 Nov 1992 16:21:02 GMT
- Lines: 48
-
- I can't tell you the exact algorithm, but I can tell you the basic
- way in which Satori works.
-
- The appearance of movement in Satori is done by cycling the color
- table. This can be done fairly easily by generating a color table
- in your program and then inserting the colors into the Apple's
- color table. To get the movement effect, simply push the stack down
- by one, pop off the bottom color, and place the color onto the top
- of the stack (or vice versa). As the colors move, so does the illusion
- of the picture moving.
-
- The "points" on the screen which you see are really the starting
- points for the drawing. These points can be predefined based upon
- what kind/type of screen you are trying to draw. The entries into
- the places on the screen are used to radiate out, usually in a
- circular pattern, the numbers of what colors are to go where. So
- you could do the following:
-
-
-
- 66666666666665432123456
- 65555555555565432223456
- 65444444444565433333456
- 65433333334565444444456
- 65432222234565555555556
- 65432121234566666666666
- 65432222234566666666666
- 65433333334566666666666
- 65444444444566666666666
- 65555555555566666666666
- 66666666666666666666666
-
- Now, granted, 1-6 isn't the same as 0-255, but you get the idea I
- think. Once everything is in place, you simply cycle the color
- table and you get a ripple/wave effect which radiates out from the
- points (here represented by the "1"s).
-
- Note that the numbers don't change (ie:1 does not become 2, etc...)
- but that the entry in the color table changes which _makes_ it
- appear as if you had changed the colors all over the screen. This
- is a much faster way to do this than trying to find and update all
- of the colors on the screen.
-
- An an example of this, use the Multimodule option in AfterDark.
- Create a Multimodule with Satori behind a picture and watch the
- results.
-
- I hope this helps. :)
-