https://www.geeksforgeeks.org/equation-of-circle-when-three-points-on-the-circle-are-given/
equation of circle: x^2 + y^2 + 2*g*x + 2*f*y + c = 0
2f = ( ( x12 – x32 )( x1 – x2 ) +( y12 – y32 )( x1 – x2 ) + ( x22 – x12 )( x1 – x3 ) + ( y22 – y12 )( x1 – x3 ) ) / ( y3 – y1 )( x1 – x2 ) – ( y2 – y1 )( x1 – x3 )
2g = ( ( x12 – x32 )( y1 – x2 ) +( y12 – y32 )( y1 – y2 ) + ( x22 – x12 )( y1 – y3) + ( y22 – y12 )( y1 – y3 ) ) / ( x3 -x1 )( y1 – y2 ) – ( x2 – x1 )( y1 – y3 )
c = -x12 – y12 – 2gx1 – 2fy1center: (h = -g, k = -f
) radius: r^2 = h^2 + k^2 - c
When run a template within a fsm, that template becomes a sub fsm, and the fsm running this template becomes the “host”.