↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Bresenham Algorithm - plot lines and curves

The page presents a compact and efficient Bresenham-based implementation for plotting lines, circles, ellipses and quadratic Bézier curves. It says the same rasterising principle can be used for any curve, and that the code examples are accompanied by a PDF and source file.

Reading notes
#

  • The implementation is described as simple, compact and efficient.
  • It includes examples for line drawing, circles, ellipses and quadratic Bézier curves.
  • The line example uses Bresenham’s line algorithm.
  • The circle example uses the midpoint circle algorithm.
  • The ellipse example plots an ellipse inside a specified rectangle.
  • The Bézier example plots a quadratic Bézier curve limited to gradients without sign change.
  • The listed features are universal, fast, simple and exact.
  • The page says the algorithm plots curves without approximation.