Oberon Community Platform Forum

Development => General => Topic started by: sage on February 01, 2009, 06:07:03 PM



Title: Antialiasing in 2D graphics
Post by: sage on February 01, 2009, 06:07:03 PM
The experience gained from experiments with adaptive antialiasing found suitable for antialiasing in 2D graphics.
BohdanT modified WMClock module to draw a pretty clock's arrows in analog mode.
The result was good, but the whole picture was spoiled by the effect of aliasing on arrows.
I decided to demonstrate the possibility of using adaptive antialiasing, in this case too. The multilevel adaptive antialiasing is now fully implemented, and the number of the levels may be provided.
http://sage.com.ua/files/AA2DGraphics.zip
Here is the result of the algorithm:


Title: Re: Antialiasing in 2D graphics
Post by: Alexey on February 01, 2009, 06:39:06 PM
Well done, Sage!

but there is a small problem :), in particular with rendering the arrows. The length of all arrows changes with the change of their position. The effect is quite well seen with the seconds arrow. This is somehow aliasing problem of drawing narrow arrow endings at different angles.

Regards,

Alexey


Title: Re: Antialiasing in 2D graphics
Post by: staubesv on February 01, 2009, 11:31:41 PM
Looks pretty nice!  8)


Title: Re: Antialiasing in 2D graphics
Post by: sage on February 02, 2009, 06:32:20 AM
This is somehow aliasing problem of drawing narrow arrow endings at different angles.
Probably, problem may disappear if arrow endings will be blunt a little. It's possible to add one more triangle to arrow's shape  ;)


Title: Re: Antialiasing in 2D graphics
Post by: sage on February 02, 2009, 06:37:25 AM
Looks pretty nice!  8)
Thanks! Actually, I don't like arrows' colors ;D I think, clock may looks even better with different colors with some alpha values, because alpha-blending also supported  ;)