Year: 2026
Type: preprint
Abstract: We present a circle-drawing algorithm based on a Direct Form 2 (DF2) second-order recursive digital filter, derived from the z-transform of discrete sinusoidal oscillators. The algorithm exploits the well-known resonator recurrence w[n] = 2 cos(ω) • w[n−1]−w[n−2] to generate both sine and cosine sequences from a single difference equation, requiring only two multiplications per coordinate pair in a tight, branch-free inner loop. Unlike Bresenham's algorithm, which requires explicit 8-way symmetry exploitation, the DF2 approach naturally traces the complete circle parametrically. Benchmarks on modern processors demonstrate that the DF2 algorithm outperforms standard Bresenham implementations for circles of radius 50-200 pixels, achieving speedups of 1.4-2.2× due to its branch-free execution enabling better pipelining. However, the DF2 realization exhibits numerical instability at large radii due to the filter coefficient approaching the stability boundary. We provide a complete analysis of the stability constraints, derive the critical radius for various fixed-point precisions, and characterize the performancestability tradeoff. This work bridges digital signal processing filter theory with classical computer graphics, offering both practical utility for embedded systems and pedagogical value for interdisciplinary education.
Institution: The University of Texas at Austin
Language: English
Subfield: Signal Processing
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7130615919
