POV-Ray : Newsgroups : povray.off-topic : Memories : Re: Memories Server Time
29 Jul 2024 22:32:41 EDT (-0400)
  Re: Memories  
From: Orchid XP v8
Date: 20 Aug 2011 08:25:38
Message: <4e4fa7c2$1@news.povray.org>
On 20/08/2011 12:11 PM, Warp wrote:
> Orchid XP v8<voi### [at] devnull>  wrote:
>> The assignment was basically to implement Bresenham's Algorithm,
>> optionally *with* antialiasing for extra marks.
>
>    IIRC the algorithm in question can be used to roughly *approximate*
> antialiasing of the line, but it's not mathematically accurate.
>
>    Drawing an accurate antialiased line (of certain width) is not a trivial
> problem. Basically for each pixel you need to calculate how much of it is
> covered by the line. Doing this accurately with integer math only can be
> complicated.

In the simple case of lines beginning and ending on pixel boundaries, 
it's pretty easy. I'm not aware of any way in which Bresenham's 
algorithm deviates from a perfect solution.

On the other hand, if you want lines that begin and end at fractional 
coordinates, or have rounded ends or whatever, the problem becames far 
more complicated.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.