invert
Performs circle inversion of a point.
Circle inversion is a geometric transformation where a point is mapped to another point along the same ray from the center, but at a distance that is inversely proportional to the original distance.
The formula used is: P' = C + r²/|P-C|² * (P-C) Where:
P is the point to invert
C is the center of the circle
r is the radius of the circle
P' is the inverted point
Return
The inverted point
Parameters
The point to invert
Performs circle inversion of another circle.
Circle inversion maps a circle to another circle (or a line, which can be considered a circle with infinite radius).
There are several cases:
If the circle to be inverted passes through the center of the inverting circle, the result is a line
If the circle to be inverted doesn't contain the center of the inverting circle, the result is another circle
If the circle to be inverted contains the center of the inverting circle, the result is also a circle
Return
The inverted circle
Parameters
The circle to invert
Throws
if the circle to be inverted is centered at the center of the inverting circle