- #1
Gbl911
- 18
- 0
Thread moved from the technical forums to the schoolwork forums
Given the following equation:
R = ((Q-P) / |Q-P|) ⋅ V
where Q, P, and V are 3 dimensional vectors, R is a scalar, "⋅" denotes the dot product, and |Q-P| is the magnitude of Q-P.
Assuming Q, V, and R are known and given 3 independent equations with different values for Q, V, and R that all correspond to one vector P, solve for all elements of P.
As an example the first equation would be:
R1 = ((Q1-P) / |Q1-P|) ⋅ V1
Expanding this out to view individual elements yields:
R1 = ((Q11-P1)V11 + (Q12-P2)V12 + (Q13-P3)V13) / sqrt((Q11-P1)2 + (Q12-P2)2+ (Q13-P3)2)
From here I have gotten some of the way through solving the 3 equations by substitution but it becomes unbearably long and requires the quadratic equation due to the sqrt... I have also tried using every numerical method I know to solve it but it seems the equation is far to ill conditioned and gradient methods are almost useless. I haven't found anything online regarding it and was hoping some of you who are good at math would be able to give me some guidance. I'm hoping there is a way without having to go through the substitution by hand but I may end up just doing that....
R = ((Q-P) / |Q-P|) ⋅ V
where Q, P, and V are 3 dimensional vectors, R is a scalar, "⋅" denotes the dot product, and |Q-P| is the magnitude of Q-P.
Assuming Q, V, and R are known and given 3 independent equations with different values for Q, V, and R that all correspond to one vector P, solve for all elements of P.
As an example the first equation would be:
R1 = ((Q1-P) / |Q1-P|) ⋅ V1
Expanding this out to view individual elements yields:
R1 = ((Q11-P1)V11 + (Q12-P2)V12 + (Q13-P3)V13) / sqrt((Q11-P1)2 + (Q12-P2)2+ (Q13-P3)2)
From here I have gotten some of the way through solving the 3 equations by substitution but it becomes unbearably long and requires the quadratic equation due to the sqrt... I have also tried using every numerical method I know to solve it but it seems the equation is far to ill conditioned and gradient methods are almost useless. I haven't found anything online regarding it and was hoping some of you who are good at math would be able to give me some guidance. I'm hoping there is a way without having to go through the substitution by hand but I may end up just doing that....
Last edited: