How did Bresenham represented pixel grids to derive his line drawing algorithm?

3 points by shivajikobardan a day ago

I am seeking for a succinct source regarding how did Bresenham's imagined the pixel grids. Because different APIs have different implementations of pixel grid. Without the fundamental understanding of a pixel grid, it is impossible to understand the derivation of line drawing algorithm and circle drawing algorithm. I hope to get some valuable input from hackers.

dfranks a day ago

It was apparently developed for drawing lines on pen plotters. Pen plotters use either stepper motors or servo motors with encoders. In the simplest case, stepper motors, one of the steppers is the major axis and is instructed to step for each new "pixel". The other motor is the minor axis and only steps when the fractional add overflows into the integer portion of the coordinate.

So, pen plotters effectively have "pixels" as defined by the stepper or encoder positions of the motors.

Someone a day ago

Bresenham’s paper is online at https://dl.acm.org/doi/10.1145/280811.280913.

It has 6 pages. Is that succinct enough?

Also, as dfranks says, it was developed for plotters, so he didn’t think of pixels.

  • shivajikobardan a day ago

    Thank you. One question, what is it we are trying to plot? The entire square? Or just the small circle?

    • Someone a day ago

      Hm, I guess you aren’t old enough to know what a pen plotter is. They’re drawing a line with a pen. See https://en.wikipedia.org/wiki/Plotter:

      “Pen plotters print by moving a pen or other instrument across the surface of a piece of paper. This means that plotters are vector graphics devices, rather than raster graphics as with other printers. Pen plotters can draw complex line art, including text, but do so slowly because of the mechanical movement of the pens. They are often incapable of efficiently creating a solid region of color, but can hatch an area by drawing a number of close, regular lines.”