@jremington, “go mode”

@Monalith, I briefly reviewed “circle through 3 points” and the Midpoint Circle Algorithm (aka Bresenham’s algorithm). While you can get the center and radius from the former, drawing just the arc with the latter is a little messy. As you noted, the octant approach makes it a little tricky.

You could change the approach to plotting just one pixel at each step, instead of 8, walking all the way around the circle instead of just one octant. This requires changing the stepping from X to Y at 4 of the octant boundaries (the odd 45s). The increment may change sign at any of the octant boundaries (the 90s).

That is, if octant boundary 0 is the East direction (positive x direction), then CCW:

Octant |
Step |
Inc |

0 |
Y+ |
X- |

1 |
X- |
Y+ |

2 |
X- |
Y- |

3 |
Y- |
X- |

4 |
Y- |
X+ |

5 |
X+ |
Y- |

6 |
X+ |
Y+ |

7 |
Y+ |
X+ |

It should be obvious to the most casual observer that only a Small Matter Of Programming is required. This is left as an exercise for the reader.

As others have noted, by the time you calculate the center and radius, then plot each pixel, you could have probably drawn the line segments. Not to mention the amount of thinking and code…

Cheers,