Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another small filled circe sub (not as fast as fcirc)
#68
Lol, I never dream this thread would become so active.

A little tweaking test.  I thought removing the y = y + 1 in the WHILE/WEND in FC3 like below would speed it up a tad, but it didn't seem to.  In fact, this FOR/NEXT version usually comes in trailing behind the others on my laptop, but still fast.

- Dav

Code: (Select All)
Sub FCtweak (cx, cy, r, clr~&)
    r2 = r * r
    For y = 0 To r
        x = Sqr(r2 - y * y)
        Line (cx - x, cy + y)-(cx + x, cy + y), clr~&, BF
        If y <> 0 Then Line (cx - x, cy - y)-(cx + x, cy - y), clr~&, BF
    Next
    Line (cx - r, cy)-(cx + r, cy), clr~&, BF
End Sub

Find my programs here in Dav's QB64 Corner
Reply


Messages In This Thread
RE: Another small filled circe sub (not as fast as fcirc) - by Dav - 08-31-2024, 02:18 PM



Users browsing this thread: 24 Guest(s)