Draws circumcircles for each selected path.
Method:
The major reason why this script was written was to draw a “circumcircle” for a star.
So the method to find the center and the radius for the circumcircle is rather incertitude.
- find out a perpendicular bisector for the line connecting 1st and 2nd anchor
- do the same for 1st and 3rd anchor (if the path is a triangle, 2nd and 3rd anchor)
- find out intersection point of 1 and 2. for the center of the circumcircle to draw
- find out the length of the line connecting the center and 1st anchor, then do the same for the center and 2nd anchor. define longer one as the radius of the circumcircle to draw.
The rightmost one in the picture above is a case of failure.