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: 127)
.pdf   BELIPSE.PDF (Size: 46.68 KB / Downloads: 154)
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  A Small Game Tutorial (from 2014) SMcNeill 2 997 11-13-2023, 09:11 PM
Last Post: Kernelpanic
  Small exploding image and fade-out effect Dav 18 3,609 09-08-2023, 11:16 PM
Last Post: dbox
  Space Orbs. Small screen saver. Dav 16 3,225 08-27-2023, 07:52 PM
Last Post: grymmjack
  Ball Sub - draws several kind of filled, textured balls (circles) Dav 15 3,551 08-23-2023, 09:31 PM
Last Post: Dav
  Improved my small Gradient Ball drawing SUB Dav 22 5,410 07-13-2023, 05:23 PM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)