In three dimensional space, there is a plane whose normal is vector n,
In that plane three points exist as C,P and T, to form triangle
Distances between them are known as:
|CP|=r
|CT|=k
|PT|=l
It is right triangle as angle at P is 90: angle( CPT) is 90 degree
Coordinates of C and T are known.
Normal Vector to plane is known: that is n
I need to find coordinates of P (that exist in same plane)?
It follows from Thales's theorem, that $\mathbf{P}$ lies on the circle whose center is the midpoint of $\mathbf{C}$ and $\mathbf{T}$. Thus define the vector
$\mathbf{v_1} = 0.5(\mathbf{C} - \mathbf{T}) $
and
$\mathbf{v_2} = \mathbf{n} \times \mathbf{v_1} $
where $n$ is assumed to be a unit vector (if it is not, then we have to normalise it by dividing it by its length).
Point $\mathbf{P}$ is given by
$\mathbf{P} = 0.5(\mathbf{C} + \mathbf{T}) + \mathbf{v_1} \cos t + \mathbf{v_2} \sin t , \hspace{20pt} t \in [0, 2\pi) $
There can be two values of $\theta$ whose values are:
$\theta = \phi $, and $ \theta = 2\pi - \phi $
where $\phi = 2 \tan^{-1} \dfrac{ | \mathbf{PC} |}{| \mathbf{PT}| } $