Is bresenhams line algo the ONLY algo?

Is bresenhams line algo the ONLY algo?

Post by Ken Wronkiewic » Wed, 06 Dec 2000 04:00:00



Quote:> hi everyone,

> I'm looking for speed and well, I'm left wondering if there is a way of
> drawing a line (I'm interested mainly in it's ability to scan down the
side
> of a polygon) that doesnt involve bresenhams? are there any other? perhaps
> higher performace algorithms

> thanks, just a short one :P keep your brains ticking over

Actually, yes.

Even though the theoretical textbooks always use Bresenham's, everybody else
uses other algorythims.

Best bet, for the most part, is to reduce the angled line to a series of
horizontal or vertical lines and then process those.  Then you get a
relitively simple loop.

I'm handwaving a lot here..

But if you are doing appreciable calculations at each pixel -- more than
just drawing -- it's probably better to just use Bresenham's.

 
 
 

Is bresenhams line algo the ONLY algo?

Post by Kosh » Thu, 07 Dec 2000 13:41:57


hi everyone,

I'm looking for speed and well, I'm left wondering if there is a way of
drawing a line (I'm interested mainly in it's ability to scan down the side
of a polygon) that doesnt involve bresenhams? are there any other? perhaps
higher performace algorithms

thanks, just a short one :P keep your brains ticking over

kosh

 
 
 

Is bresenhams line algo the ONLY algo?

Post by Parashar Krishnamachar » Thu, 07 Dec 2000 04:00:00



> I'm looking for speed and well, I'm left wondering if there is a way of
> drawing a line (I'm interested mainly in it's ability to scan down the side
> of a polygon) that doesnt involve bresenhams? are there any other? perhaps
> higher performace algorithms

        In general, scan-converting a polygon is not the best place to use
Bresenham's.  If you're trying to just rasterize a line, then
Bresenham's is a good.  Wu also originally had a modification of
Bresenham's where he doubled all the parameters and used it to test for
the next two pixels at every loop (what would the pattern of the next
two be)
        The main thing is that Bresenham's has a fair number of idle loops.
The thing is that when you actually fill the polygons, there are going
to be pixels on the edges that you will anyway overwrite if the line is
complete.  A simple divide and run through all the y positions to find
x-positions is usually enough.  With Bresenham's, since you're concerned
with edges, you're going to keep looping and not write a value until a
change in the dependent axis occurs.

- Parashar K.

 
 
 

Is bresenhams line algo the ONLY algo?

Post by Jan Stou » Fri, 08 Dec 2000 04:00:00


Check out the latest issue of IEEE Computer Graphics and Applications
(Nov/Dec 2000),
ther you can find a tutorial on the subject:

  "Why step when you can run?" by Peter Stephenson and Bruce Litow

 
 
 

Is bresenhams line algo the ONLY algo?

Post by Dave Eberl » Sat, 09 Dec 2000 22:43:05



Quote:> What about this algorithm (see below)? I found it in
> an ancient book called "The Sinclair ZX81 Pocket
> Book" :-D and I am using it all the time.

> As far as I can tell, it looks very efficient, and I think it is
> *not* Bresenham.

I have met Bresenham and I can certainly say that your
algorithm is not him.

Quote:> However, I do not think that it is *more* efficient
> than Bresenham.

Agreed.  Bresenham is one of the most efficient people
I have ever met.

By the way, if you look closely at the code, you will see
the characteristic decision variables that show up in
Bresenham's line drawing algorithm.  Certainly the code
is at most a minor variation on what you might see in
the text books or elsewhere.

--
Dave Eberly

http://www.magic-software.com

 
 
 

Is bresenhams line algo the ONLY algo?

Post by Bastiaan Huisma » Fri, 29 Dec 2000 07:07:07


I use bresenham to edgescan my polygons (flatshaded) and for 2 D lines it is
quite a bit faster (because of the lack of doubles and casts).

But trying to do bresenham for gouraud shaded, perspective correct, texture
mapped polygons was hell, very long code and it was slower than just
interpolating. Is there a fast way to do say 5 or 6 dimensional bresenham
that is faster than interpolation??

 
 
 

Is bresenhams line algo the ONLY algo?

Post by Harry of DAI » Fri, 29 Dec 2000 07:25:48




Quote:> I use bresenham to edgescan my polygons (flatshaded) and for 2 D lines it
is
> quite a bit faster (because of the lack of doubles and casts).

> But trying to do bresenham for gouraud shaded, perspective correct,
texture
> mapped polygons was hell, very long code and it was slower than just
> interpolating. Is there a fast way to do say 5 or 6 dimensional bresenham
> that is faster than interpolation??

in my opinion: no :)
 
 
 

1. Bresenhams Circle Algo question.

Hi All,

Could anyone tell me if its possible to calculate how many pixels will be
drawn using Bresenhams circle algorithm, specifically when this algo is
used to draw circular arcs ?, this is for a stepping motor project and not
graphics, but the raster device model remains the same.

Thanks......
Ken.

2. system lockup

3. WANTED oval algo and/or fill algo

4. LW Character Animation F/X mistakes?

5. 2D circles & connecting lines layout algo

6. Converting Hard Copy Docs to Multi/Hyper Media

7. URGENT-2D circles & connecting lines layout algo

8. World's fastest line algo?

9. Line drawing algo

10. Hidden Line Removal Algo WHERE

11. Help in breshnam's line drawing algo