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