# Orthogonal vector with fixed lenght

Given a long vector called A and a direction vector called B, how can one retrieve a position vector OC where a orthogonal line casted down to A has a fixed lenght?

The image above shows a 2d representation of my problem. Although, i need a solution for 3d space.

-
add comment

## 1 Answer

Let $\lambda \in \mathbb R$, $\overrightarrow{OC} = \lambda \cdot \vec B$, and $\vec L = \overrightarrow{FC}$. Denote by $\alpha$ the angle between $\vec A$ and $\vec B$. We get $\sin \alpha = \frac{|\vec L|}{|\overrightarrow{OC}|}$, so $|\overrightarrow{OC}| = |\vec L|/\sin \alpha$ and therefore $\lambda = |\vec L|/|vec B|\sin\alpha$.

HTH, AB, martini.

-
(you meant to type \vec B instead of vec B -- I would edit it for you, but there's a silly rule that edits must be at least 6 characters) –  William DeMeo Mar 7 '12 at 10:21
I already came up with that solution, although its currntly not working for me. I have some sign errors which seem to occur completly randomly but reading a post with the exactly same solution assures me that this is mathematical right. I was unsure though, since i never applied trigonometric functions to vectors. –  Paranaix Mar 7 '12 at 10:57
I finally found my problem :) . The sinus function expected the argument to be in radians but i worked with degress. Took me ages to realize :( –  Paranaix Mar 7 '12 at 11:10
add comment