I have a circle (with a position and radius), and a vector. I need to know what the radius would be of a circle where every point on the border is tranformed by this vector relative to the tangent of the border in that point. Have a look at the following image:
Given A, the radius of c and a vector V such that (J-I = V, F-E = -V, D-C = V rotated to the left, and H-G = V rotated to the right) what is the radius of circle d, that goes through J, H, F and D? I also need to know what the difference in radians is from I to J, so I know how much the 'rotation' of d differs from that of c.
I'm a bit at a loss as to how to approach this problem, I know the change in radius is the distance from K to F as shown in the image below, and that the rotation is the position in radians from K minus the position in radians from E, but I don't know how to put it in numbers.
How do I calculate this for any A, c and V?
Nevermind, after making those illustrations it became rather obvious what the solution is, I just have to calculate the change for one point on the circle, and that gives me both the radius and the rotation.
The solutution is as follows:
$$E = \begin{pmatrix} A_x + r_c \\ A_y \end{pmatrix}$$ $$F = E + V$$ $$r_d = |F-A|$$ $$\epsilon = atan2(F-A)$$
$\epsilon$ is the rotation and $r_d$ is the radius of circle d; $atan2()$ calculates the direction of a vector(https://en.wikipedia.org/wiki/Atan2)
Here is some Rust code that does the calculations.
($V$, $r_c$ and $A$ are as defined in the question)