home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 260.lha / Bezier / readme < prev   
Encoding:
Text File  |  1989-07-07  |  1.2 KB  |  24 lines

  1.     This hack opens up a custom 32 color lo-res screen and draws a bunch
  2. of bezier curves. Each of the four control points for the curve moves
  3. in a randomly chosen velocity. When a control point hits the side of the screen,
  4. it is bounced back and the velocity negated. Every once in a while, it will
  5. change colors and velocities.
  6.     The method used to draw the curves isn't the best. What subdivision lacks
  7. in speed, it makes up for in simplicity. If it drew about twice as fast, it
  8. would be a lot more exciting to watch. Playing with the way it chooses
  9. colors and velocities, or changing the pallette could help, too.
  10.     The source code is pretty straight-forward. The only really interesting
  11. thing in it is the way that the coordinates are stored in registers. Since
  12. each coordinate is guaranteed to be positive, and to fit in a word, both
  13. x and y coordinates are stored in one long word. When the program has to
  14. average two points together, it adds them together as one long word,
  15. shifts right, and clears bit 15. Not only is this faster than two adds
  16. and two shifts, but it also allows the curve drawer to keep everything in
  17. registers.
  18.  
  19.             Chris Green
  20.             Subliminal Software/Lerner Research
  21.             2309 Rock St #13
  22.             Mountain View, CA 94043
  23.             (415)-969-4757
  24.