home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / misc / 19097 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  2.4 KB

  1. Xref: sparky comp.sys.mac.misc:19097 comp.sys.mac.apps:17114
  2. Newsgroups: comp.sys.mac.misc,comp.sys.mac.apps
  3. Path: sparky!uunet!stanford.edu!bcm!aio!mark@cheers.jsc.nasa.gov
  4. From: mark@cheers.jsc.nasa.gov (Mark Manning)
  5. Subject: Re: anyone know how "Satori" works on the "After Dark" porogram?
  6. Message-ID: <1992Nov12.162102.24725@aio.jsc.nasa.gov>
  7. Sender: news@aio.jsc.nasa.gov (USENET News System)
  8. Organization: Simulacron I
  9. References: <1992Nov11.121326.17348@husc3.harvard.edu>
  10. Distribution: usa
  11. Date: Thu, 12 Nov 1992 16:21:02 GMT
  12. Lines: 48
  13.  
  14. I can't tell you the exact algorithm, but I can tell you the basic
  15. way in which Satori works.
  16.  
  17. The appearance of movement in Satori is done by cycling the color
  18. table.  This can be done fairly easily by generating a color table
  19. in your program and then inserting the colors into the Apple's
  20. color table.  To get the movement effect, simply push the stack down
  21. by one, pop off the bottom color, and place the color onto the top
  22. of the stack (or vice versa).  As the colors move, so does the illusion
  23. of the picture moving.
  24.  
  25. The "points" on the screen which you see are really the starting
  26. points for the drawing.  These points can be predefined based upon
  27. what kind/type of screen you are trying to draw.  The entries into
  28. the places on the screen are used to radiate out, usually in a
  29. circular pattern, the numbers of what colors are to go where.  So
  30. you could do the following:
  31.  
  32.  
  33.  
  34.      66666666666665432123456
  35.      65555555555565432223456
  36.      65444444444565433333456
  37.      65433333334565444444456
  38.      65432222234565555555556
  39.      65432121234566666666666
  40.      65432222234566666666666
  41.      65433333334566666666666
  42.      65444444444566666666666
  43.      65555555555566666666666
  44.      66666666666666666666666
  45.  
  46. Now, granted, 1-6 isn't the same as 0-255, but you get the idea I
  47. think.  Once everything is in place, you simply cycle the color
  48. table and you get a ripple/wave effect which radiates out from the
  49. points (here represented by the "1"s).
  50.  
  51. Note that the numbers don't change (ie:1 does not become 2, etc...)
  52. but that the entry in the color table changes which _makes_ it
  53. appear as if you had changed the colors all over the screen.  This
  54. is a much faster way to do this than trying to find and update all
  55. of the colors on the screen.
  56.  
  57. An an example of this, use the Multimodule option in AfterDark.
  58. Create a Multimodule with Satori behind a picture and watch the
  59. results.
  60.  
  61. I hope this helps. :)
  62.