I have the following geometric drawing:
Given are:
- Points $P$ and $V$
- Vectors $\color{green}{\vec{r}}$, $\color{orange}{\vec{n}}$ and $\color{blue}{\vec{q}}$ (which are all normalized)
- Distance $|GH|$ between $G$ and $H$ (while $G$ and $H$ as such are not given)
- $V$ lies exactly in the middle between $G$ and $H$
I want to know the distance $|AB|$ between $\color{red}A$ and $\color{red}B$.
Normally I want to show you, what I've already done. But this time, I have a larger problem, and this is the part where I am stuck at. So unfortunately, the only thing, that I already calculated in this part is the distance $|PE|$, from the projection of $\vec{PV}$ along $\vec{r}$: $|PE| = \vec{PV} \cdot \vec{r}$. But this didn't help me, so I am now asking here.
Edit:
I already thought of calculating the points $G = V + \frac{|GH|}{2} \cdot \color{blue}{\vec{q}}$, and $H = V - \frac{|GH|}{2} \cdot \color{blue}{\vec{q}}$. Then I have the lines $\vec{PH}$ and $\vec{PG}$. I can intersect those lines with the substrate $\vec{s} = V + \lambda \cdot \vec{w}$ where $\vec{w} \bot \color{orange}{\vec{n}}$ to get the points $\color{red}A$ and $\color{red}B$.
But since I am not interested in neither $\color{red}A$ nor $\color{red}B$ I was wondering, if there is a simpler approach to just calculate the distance $|AB|$. So I would avoid the costs for calculating $\color{red}A$ and $\color{red}B$. My gut's telling me, that there has to be something like a trigonometric function of the angle between $\color{orange}{\vec{n}}$ and $\color{green}{\vec{r}}$. This would be much more efficient (I have to calculate the distance $|AB|$ many times in a program).
Edit after help from gimusi: I can calculate the distance $|VB|$ with: \begin{align} H &= V - \frac{|GH|}{2} \cdot \color{blue}{\vec{q}} \\ \vec{HP} &= P - H \\ \alpha = \angle PVB &= 90° - \arccos \left(\frac{\vec{VP}\cdot \vec{n}}{|\vec{VP}|} \right) \\ \gamma &= \arccos \left(\frac{\color{blue}{\vec{q}} \cdot \vec{HP}}{|\vec{HP}|} \right) \end{align}
Now I use the law of sine to calculate $\sin \delta$: \begin{align} \frac{\sin \gamma}{|\vec{VP}|} &= \frac{\sin \delta}{|\vec{VH}|} \\ \sin \delta &= \frac{|\vec{VH}|}{|\vec{VP}|} \cdot \sin \gamma \end{align}
Now I know $\alpha$ and $\delta$, and with that $\beta = 180° - \alpha - \delta$.
With that I can use again the law of sine to calculate $|VB|$:
$$\frac{|VB|}{\sin \delta} = \frac{|VP|}{\sin \beta}$$
This gives me: \begin{align} |VB| &= |VP| \cdot \frac{\sin \delta}{\sin \beta} \\ |VB| &= |VP| \cdot \frac{\frac{|VH|}{|VP|} \cdot \sin \gamma}{\sin \beta} \\ &= |VP| \cdot \frac{\frac{|VH|}{|VP|} \cdot \sin \left(\arccos\left(\frac{\vec{q} \cdot \vec{HP}}{|\vec{HP}|}\right)\right)}{\sin \left(180° - \left(90° - \arccos \left(\frac{\vec{VP} \cdot \vec{n}}{|\vec{VP}|}\right)\right) - \delta\right)} \\ &= |VP| \cdot \frac{\frac{|VH|}{|VP|} \cdot \sin \left(\arccos\left(\frac{\vec{q} \cdot \vec{HP}}{|\vec{HP}|}\right)\right)}{\sin \left(180° - \left(90° - \arccos \left(\frac{\vec{VP} \cdot \vec{n}}{|\vec{VP}|}\right)\right) - \arcsin\left(\frac{|\vec{VH}|}{|\vec{VP}|} \cdot \sin \gamma \right) \right)} \\ &= |VP| \cdot \frac{\frac{|VH|}{|VP|} \cdot \sin \left(\arccos\left(\frac{\vec{q} \cdot \vec{HP}}{|\vec{HP}|}\right)\right)}{\sin \left(180° - \left(90° - \arccos \left(\frac{\vec{VP} \cdot \vec{n}}{|\vec{VP}|}\right)\right) - \arcsin\left(\frac{|\vec{VH}|}{|\vec{VP}|} \cdot \sin \left( \arccos \left(\frac{\color{blue}{\vec{q}} \cdot \vec{HP}}{|\vec{HP}|} \right) \right) \right) \right)} \end{align}
I am not sure, if this is quite correct?

HINT
Update after editing
As an alternative