I found this, which is C# to move a point in a circle. Can this be adapted to BS? Since we're stuck with the upper left point as the reference, I need to move that point in a circle with a radius of the object/2 while rotating the object which BS will do for me.
public static void DrawCircle(int x0, int y0, int radius)
{
int x = radius;
int y = 0;
int radiusError = 1-x;
while(x >= y)
{
DrawPixel(x + x0, y + y0);
DrawPixel(y + x0, x + y0);
DrawPixel(-x + x0, y + y0);
DrawPixel(-y + x0, x + y0);
DrawPixel(-x + x0, -y + y0);
DrawPixel(-y + x0, -x + y0);
DrawPixel(x + x0, -y + y0);
DrawPixel(y + x0, -x + y0);
y++;
if (radiusError<0)
{
radiusError += 2 * y + 1;
}
else
{
x--;
radiusError += 2 * (y - x + 1);
}
}
}
Kinetics Screensavers