# Point a normal vector towards a point in 3D-Space

Given a normal vector in 3D-Space, how can I rotate the vector, such it points to a point in 3D-Space.

I tried couple of ways doing this, which ended up looking completely wrong. • If the answer from @lightxbulb isn't what you are looking for then perhaps you could clarify your questions some. Oct 11, 2022 at 18:27
• Vectors do not have position, only direction and magnitude, so creating a vector that "points to a point in 3D-Space" isn't possible. Nov 7, 2022 at 17:08

Let $$e,f$$ be the two edges of the triangle. Let's construct an orthonormal system: $$e = normalize(e)$$, $$n = normalize(e\times f)$$, $$f = n \times e$$, where $$\times$$ is the cross product. Now compute:
$$e' = e - \frac{e \cdot n'}{1+(n\cdot n')}(n+n')$$
$$f' = f - \frac{f \cdot n'}{1+(n\cdot n')}(n+n')$$
$$R = \begin{bmatrix} e' & f' & n'\end{bmatrix} \begin{bmatrix} e^T \\ f^T \\ n^T \end{bmatrix}.$$
Note that the computation of $$e'$$ and $$f'$$ breaks for $$n' = -n$$.