I'm trying to create some graphics function for a ZX Spectrum (Z80) machine in assembler. I already have the basics except for the arc.
I know that there must be some way to draw an arc using the Bresenham's circle algorithm but I'm unable to find concrete info about it, there are sentences like "set the pixels only if they fall into the wanted interval" but I have no clue on how to determine if the pixels fall within it.
As data I have the circle's center and radius and the start and end points of the arc in the circle, I only miss how to determine if a pixel lies in the arc, if the algorithm were completely linear (start at 0º and sweep to 360º) it would be easy to do not draw until the start point is reached and then continue drawing until the last point is reached, but the Bresenham's algorithm is drawn in octants simultaneously so I have no idea on how to do it.
I'm not tied to anything so any other algorithm would be welcome, no need to be specifically for the spectrum, just any assembler algorithm to draw an arc will be enough, even if I need different info (like the three point arc algorithm).
Cheers.