How to find the x,y elements of a 3D vector when origin, direction, z are known

Click For Summary
SUMMARY

This discussion focuses on determining the x and y coordinates of a 3D vector when the origin, direction, and a specific z-coordinate are known. The origin is given as (-1.1258, 100.8336, 2489.9998) and the direction as (-0.1115, 0.0826, -0.9903). The solution involves using the equation of a line in 3D space, expressed as p + λq = r, where p is the origin, q is the direction, and r is the final point. By substituting the z-coordinate of -512 into the equation, one can solve for λ to find the corresponding x and y coordinates.

PREREQUISITES
  • Understanding of 3D vector mathematics
  • Familiarity with linear equations and systems
  • Knowledge of matrix representation of vectors
  • Basic trigonometry concepts (optional)
NEXT STEPS
  • Study the derivation and application of the 3D line equation
  • Learn about vector operations in 3D space
  • Explore solving linear systems using matrices
  • Investigate the geometric interpretation of vectors and lines in 3D
USEFUL FOR

Mathematicians, computer graphics developers, and anyone involved in 3D modeling or physics simulations will benefit from this discussion.

dsoltyka
Messages
5
Reaction score
0
I believe this is the correct place to post this as I believe I'm going to need to solve this as a linear system, however I suppose it might be solvable using trig as well. However, I've been at it for a while and I'm out of ideas and I think I'm missing something silly.

Consider the following:

Origin = (-1.1258, 100.8336, 2489.9998)
Direction = (-0.1115, 0.0826, -0.9903)

I need to use that information to find a final point in 3D space at an arbitrary Z coordinate, -512. That final point must lie on a line parallel to a line drawn from the origin in the given direction

I had originally tried to treat it like a right triangle and solving for the hypotenuse length, and multiplying that by my direction to get the final location vector, however either that won't work or I did it wrong.

Any ideas?
 
Last edited:
Physics news on Phys.org
Nevermind, I was in fact over thinking the solution. It was simple to solve when I used the formula for a 3D line.
 
Let p denote the vector you call "origin", and let q denote the vector you call "direction". Let r denote your "final point" whose z-coordinate is -512. Then there's a number \lambda such that

\mathbf{p}+\lambda \mathbf{q}=\mathbf{r},

or expressed as matrices,

\begin{bmatrix}p_1\\ p_2\\ p_3\end{bmatrix}+ \lambda \begin{bmatrix}q_1\\ q_2\\ q_3\end{bmatrix} = \begin{bmatrix}r_1\\ r_2\\ r_3\end{bmatrix}.

Addition works componentwise, so we have

p_3 + \lambda q_3 = -512.

Just substitute the numerical values of the third components of p and q, and solve for \lambda.

(EDIT: Oh, I see you got there already!)
 
Rasalhague said:
Let p denote the vector you call "origin", and let q denote the vector you call "direction". Let r denote your "final point" whose z-coordinate is -512. Then there's a number \lambda such that

\mathbf{p}+\lambda \mathbf{q}=\mathbf{r},

or expressed as matrices,

\begin{bmatrix}p_1\\ p_2\\ p_3\end{bmatrix}+ \lambda \begin{bmatrix}q_1\\ q_2\\ q_3\end{bmatrix} = \begin{bmatrix}r_1\\ r_2\\ r_3\end{bmatrix}.

Addition works componentwise, so we have

p_3 + \lambda q_3 = -512.

Just substitute the numerical values of the third components of p and q, and solve for \lambda.

(EDIT: Oh, I see you got there already!)

I did, but the elegance of your explanation would have made it simpler for sure. Thank you :)
 

Similar threads

Replies
8
Views
1K
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
2
Views
2K