bresenham's line algorithm

Hi.

I need a program to count pixels for bresenham's line algorithm. I just can't think of how should i write my program, I need it for my uni homework. Does anyone got an already made program?
I'm not sure I understand your problem.

The number of pixels modified by Bresenham's is the longer dimension.

Have you actually studied the algorithm to see how it works?
I did it on a paper. I had this information, R = 28; O(-1, -1); 225° ÷ 270°;. I had to find pixels of 10 coordinates. Everything was okay, but now I need a program which would count any given coordinates with bresenham's line algorithm.
R? Angles?
Bresenham's doesn't traditionally have any Rs or angles in it. It works by iterating through ratios between the short and long dimensions between two coordinate pairs.

Can you be more specific about exactly what you are trying to do? And what Bresenham's Algorithm is supposed to do with it?
Topic archived. No new replies allowed.