CPCWiki forum

General Category => Programming => Topic started by: HAL6128 on 14:34, 02 December 11

Title: ...stuck in Anti-Aliasing with BASIC
Post by: HAL6128 on 14:34, 02 December 11
Just for fun I wanted to program an anti-aliasing effect in basic and got stuck. The routine uses the "Xiaolin Wu's line algorithm" (http://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm (http://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm)). A simple and "fast" algorithm which calucates distances of an ideal line to it's real coordinates (so... what I hopefully understand right). With that distance a certain colorcode could be calculated.
Now I started two basic programs in BASIC on the DSK attached. One which draws a line and another one which draws a circle. I think I have mathematical rounding problems and/or plotting on the right coordinates, because of overlapping plotting pixel or something else. I don't know.

Does anybody has a clue or experiences in anti-aliasing?
Powered by SMFPacks Menu Editor Mod