News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_HAL6128

...stuck in Anti-Aliasing with BASIC

Started by HAL6128, 14:34, 02 December 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HAL6128

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). 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?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Powered by SMFPacks Menu Editor Mod