There is no "point" algorithm - the points are infinitely small, so any point-based algorithm will take infinite time.
Instead, lines are drawn based on the conditional width of the pen and calculate how many and what intensity the pixels that stroke the line with the pen will cover.
If you just want to turn pixels on and off, like in the 1970s, then use one of the Brensenham family of algorithms.
Most modern computer graphics algorithms use anti-aliasing algorithms - either stroking, sub-sampling or accurate pixel coverage, or sometimes parallel algorithms in the GPU (for example, drawing a line by projecting a thin rectangle onto a plane or performing coverage calculations per pixel in parallel).
Many graphical algorithms are based on Bezier curves; straight lines are only curves where the control points are in a line, so the algorithms for drawing them are the same, although they can do several optimizations.
source share