Set the radius, x of center, and y of center in the sliders Click on the green flag.
This program simulates drawing a circle by drawing a polygon with 60 sides. There's a neat little programming trick in this script. The circumference of a circle = 2πr. The perimeter of a regular polygon is the product of the (number of sides) and (length of each side). Since the 60-sided polygon looks like a circle, we can set the circumference of the circle equal to the perimeter of the 60-sided polygon. therefore, 2πr = (# sides)(length of side). Solve for r to get r = [(# sides)(length of side)]/2π which reduces to r = [60)(length of side)]/6.28 Now we can set radius with the (length of side) variable determined by the radius value. I will soon modify this script to draw the arc of a circle from 1º to 360º.