this is my first time asking a question so I'm sorry in advance for any mistake I might make.

So I have 3 points in 3D space: A, B and C. What I want to do is have an object on point B point towards a specific direction.

Here's a quick drawing of what I mean.

So fistly I have a vector that goes from point B to point A. Then the same but from B to C. And finally I want to find a direction that is kind of the "average" between those two vectors (not sure if this is the right term). But not the blue line, the RED line is basically what I want. I need to get the vector that corresponds to that direction (magnitude is not important).

Should I find the vector of the line that is painted blue and then find it's perpendicular vector? Is there an easier way to find the red vector? Is this even possible?

I'm not sure if this is a silly question or not but I hope someone can help me with it! Thanks a lot.


You can compute the average of the vectors, but if you only want the direction, you can use the sum $\vec{AB} + \vec{BC} = \vec{AC}$, that has the same direction and the double of the magnitude.

Since $\vec{AB}=(B_x-A_x; B_y-A_y; B_z-A_z)$, where $A_x$ is the $x$ coordinate of point $A$, etc.

And $\vec{BC}=(C_x-B_x; C_y-B_y; C_z-B_z)$, then, after simplification:

$\vec{AB} + \vec{BC} = (C_x-A_x; C_y-A_y; C_z-A_z) = \vec{AC}$.

Note that the red (straight) line has, as characteristics, passing through point $B$ and being parallel to the straight line that passes through $A$ and $C$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.