Drawing a circle is easy: all you need is a loop and the right equations:
px = cx + r * cos(a)
py = cy + r * sin(a)
Where the center of the circle with radius
is the angle which changes as you go round the circle drawing the points / lines
The smaller the change in angle each time round your loop, the better the resolution of the circle.
So if you want a circle that is actually square, the angle has five values: 0o
, and 360o
(or their equivalent in radians) though the first and last will generate the same point. More pints, better looking circle - as the number of points you need obviously increases as the radius of the circle does because the length of its circumference is proportional to that radius.