0

I have read that question and its answers.

However I'm dealing with the case where i already know one of the points:

enter image description here

In the picture above I know the positions of A,B,C (A and C could be irrelevant here) as well as the positions of the two circle centers cAB and cBC and the radiuses. I'm looking for the position of P, which is symmetrical to B with respect to the cAB-cBC line.

I can find the linear equation of the cAB-cBC line, and find the equation of the perpendicular line that go through B, but am I overlooking some simple clever solution (proper addition of vectors for instance)?

KReiser
  • 74,746
xenoid
  • 113

1 Answers1

1

Let $v=B-cAB$ and $w=cBC-cAB$, and $u=P-cAB$. Then, $v$ and $u$ are reflections of each other in $w$, in particular if $w’$ is a unit vector perpendicular to $w$, there’s a decompositions $v=aw+bw’$ and $u=aw-bw’$.

In particular, dot producing $v$ with $w$ gives that $v\cdot w=a |w|^2$, so $$v= (v \cdot w /|w|^2)w+ (v-(v \cdot w /|w|^2)w)$$ and $$u= (v \cdot w /|w|^2)w -(v-(v \cdot w /|w|^2)w)$$

Thus, $P=cAB+ 2(v \cdot w /|w|^2)w - v$ or simplifying $P=2cAB-B+ 2((B-cAB) \cdot (cBC-cAB)/|cBC-cAB|^2)(cBC-cAB)$

Eric
  • 8,378
  • 1
    Not only it works, but I was able to implement it in my first processing application and got it right on first try... – xenoid Jun 30 '24 at 19:28