Find point in 3D space based on plane and known point I'm struggling with drawing geometry in 3D spaces via OpenGL. My current task is to find coordinates of point. 

Assume we have such input data:


*

*Points $a$, $b$ and $k$ define a plane.

*Point $c$ lays on plane defined with $a$, $b$ and $k$.

*Angle between $ab$ and $bc$ is $\beta$ (yellow color on image). 

*Length $bc$ is known value. 


How can I find coordinates of $c$?
 A: Try it:
Recall that $cb= B-C$, $ab=B-A$ and $ak=K-A$.
Let $\lambda$ and $\mu$ real numbers such that:
$$cb=\lambda (ab)+ \mu (ak)$$
Define:
$$\theta_2 = \arccos ( \frac{\langle bk, ba\rangle}{\|bk \| \|ba \|})$$
$$p_1=\|cb\|\|ab\| \cos \beta$$
$$p_2=p_1+\|cb\|\|bk\| \cos (\pi- (\theta_2 + \beta))$$
$$D =  \begin{array}{|cc|}
\langle ab,ab \rangle & \langle ak,ab \rangle \\
\langle ak,ab \rangle & \langle ak,ak \rangle \\
\end{array}$$
$$D_{\lambda} =  \begin{array}{|cc|}
p_1 & \langle ak,ab \rangle \\
p_2 & \langle ak,ak \rangle \\
\end{array}$$
$$D_{\mu} =  \begin{array}{|cc|}
\langle ab,ab \rangle & p_1 \\
\langle ak,ab \rangle &p_2 \\
\end{array}$$
Calculate $\lambda$ and $\mu$:
$$\lambda=\frac{D_{\lambda}}{D}$$
$$\mu=\frac{D_{\mu}}{D}$$
A possible point $C$ can be determined by:
$$C=B-\lambda(ab)-\mu(ak)$$
A: You need to find the coordinates $c_x,c_y,c_z$ that satisfy
$$\left|\begin{matrix}1&c_x&c_y&c_z\\1&a_x&a_y&a_z\\1&b_x&b_y&b_z\\1&k_x&k_y&k_z\end{matrix}\right|=0,$$
$$(a_x-b_x)(c_x-b_x)+(a_y-b_y)(c_y-b_y)+(a_z-b_z)(c_z-b_z)=rd\cos\beta,$$
$$(c_x-b_x)^2+(c_y-b_y)^2+(c_z-b_z)^2=r^2,$$
where $d$ is the distance between $a$ and $b$, which can be readily computed, and $r$ is the distance between $b$ and $c$, i.e. the length $bc$. The first equation ensures that the point $c$ lies in the plane defined by $a$, $b$ and $k$, the second equation gives the right angle between $ab$ and $bc$, and the third equation is needed to satisfy the distance constraint. I don't know if there is a simple analytical solution of this system, but a numerical solution can be quite easily obtained, in mathematica for instance.
