09-03-2024, 04:25 PM
yeah the "meta" algorithm is called Bresenham's and it's only a matter of from who each of us stole it from. I attached the couple of PDFs from where i learned it, then just typed it out in QB64, nothing original
the superficial way to draw a circle is to use square root, ie r = sqr(x^2 + y^2) and go from there, and likely on modern processors a simple square root might be as fast as addition, depending on how and where -- bresenham's just optimizes it away into sheer addition. the next consideration for filled circles is transparency support, avoiding overlapping lines, and assuming LINE BF is super fast as it should be
the superficial way to draw a circle is to use square root, ie r = sqr(x^2 + y^2) and go from there, and likely on modern processors a simple square root might be as fast as addition, depending on how and where -- bresenham's just optimizes it away into sheer addition. the next consideration for filled circles is transparency support, avoiding overlapping lines, and assuming LINE BF is super fast as it should be