(09-13-2023, 07:50 PM)bplus Wrote: this might be interesting:
Code: (Select All)Screen _NewImage(400, 400, 32)
r = 100
cx = _Width / 2: cy = _Height / 2
For x = 0 To r
y = Sqr(r * r - x * x)
PSet (cx - x, cy - y)
PSet (cx + x, cy - y)
PSet (cx - x, cy + y)
PSet (cx + x, cy + y)
' remove comments for no holes
PSet (cx - y, cy - x)
PSet (cx + y, cy - x)
PSet (cx - y, cy + x)
PSet (cx + y, cy + x)
Next
That's awesome, and kind of funny.
I've been mulling this in the back of my sponge all day, and I was just about to sit down and code something similar when I saw your reply.
I'm going to write up a blog entry about my own code and a testing app for it to compare performance of the alternative CIRCLE approach compared to the implementation of CIRCLE in wwwBASIC as it was when I nabbed it and how it still is today.