Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another small filled circe sub (not as fast as fcirc)
#95
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


Attached Files
.pdf   BCIRCLE.PDF (Size: 42.31 KB / Downloads: 18)
.pdf   BELIPSE.PDF (Size: 46.68 KB / Downloads: 12)
Reply


Messages In This Thread
RE: Another small filled circe sub (not as fast as fcirc) - by vince - 09-03-2024, 04:25 PM



Users browsing this thread: 32 Guest(s)