Radius of circumscribed circle of an irregular polygon
https://math.stackexchange.com/questions/2799954/finding-diameter-of-circumscribed-circle-of-an-irregular-polygon
Uses the Law of Cosines.
This can be used for the PentaChord puzzle.
m = number of sides with length A
n = number of sides with length B
The formula is:
m * arccos( 1 - ( A*A / 2*r*r ) + n * arccos( 1 - ( B*B / 2*r*r ) = 360 degrees.
For our puzzle, using length scale of x = 10:
m = 1
A = 10 * sqrt(2)
A*A = 100 * 2 = 200
n = 4
B = 10
B*B = 100
m * arccos( 1 - ( A*A / 2*r*r ) + n * arccos( 1 - ( B*B / 2*r*r ) = 360 degrees
arccos( 1 - ( 200 / 2*r*r ) + 4 * arccos( 1 - ( 100 / 2*r*r ) = 360 degrees
So the function to solve for is:
arccos( 1 - ( 100 / r*r ) + 4 * arccos( 1 - ( 50 / r*r ) - 360 degrees = 0
Radius "r" must be solved for. (with 40 year old calculator ? :-)
or solved with an Excel spreadsheet. (Somehow)
I think that the 360 is subtracted on the left side, setting the equation to 0?
Also see if the arccos is dealing with degrees or radians???
Increment "r" until some tolerance is achieved.
For scale x = 10, the approximate value of "r" is 9.2814, which is probably less that the actual value of "r".
(Some other values of approximate "r" are 9.2822, 9.2826.)
Might try an online calculator to test approximate "r" of 9.2814, to see if it is close to 0?
- Brian
With some learning I could probably do the Excel "macro".
https://en.wikipedia.org/wiki/Bisection_method
I suppose this could be done in Javascript?
Yes, this is breaking the "No Math" rule :-)