Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another small filled circe sub (not as fast as fcirc)
#57
Try FC3 this way...


Code: (Select All)
Sub FC3 (cx, cy, r, clr~&)
    Line (cx - r, cy)-(cx + r, cy), clr~&, BF
    r2 = r * r ' Dav mod
    Do While y <= r
        y = y + 1
        x = Sqr(r2 - y * y) ' r2 Dav
        Line (cx - x, cy + y)-(cx + x, cy + y), clr~&, BF
        Line (cx - x, cy - y)-(cx + x, cy - y), clr~&, BF
    Loop
End Sub


I'm also wondering about this...


Code: (Select All)
Sub FC3 (cx, cy, r, clr~&)
    Line (cx - r, cy)-(cx + r, cy), clr~&, BF
    r2 = r * r ' Dav mod
    Do Until y = r ' Since we are working with integers, would this be an alternative?
        y = y + 1
        x = Sqr(r2 - y * y) ' r2 Dav
        Line (cx - x, cy + y)-(cx + x, cy + y), clr~&, BF
        Line (cx - x, cy - y)-(cx + x, cy - y), clr~&, BF
    Loop
End Sub
Fake News + Phony Politicians = Real Problems

Reply


Messages In This Thread
RE: Another small filled circe sub (not as fast as fcirc) - by Pete - 08-30-2024, 09:56 PM



Users browsing this thread: 51 Guest(s)