3D point from a know point, distance, angle.

880 Views Asked by At

Let's assume I have a point in 3D space A(x,y,z). Two points of distance 'd' from that point A with angle $\alpha$ (with XY plane), $\beta$ (with XZ plane).What are those two points ?

enter image description here

1

There are 1 best solutions below

3
On BEST ANSWER

Let the point you're interested in be $(a,b,c)$. Now, this point is distance $d$ from $A$. You get the first equation:

$$(a-x)^2+(b-y)^2+(c-z)^2=d^2$$

Also, it seems the position vector of this point has an angle $\alpha$ with the x-y plane, meaning $\frac{\pi}{2}-\alpha$ with the z-axis. So the second equation:

$$\tan(\frac{\pi}{2}-\alpha) = \frac{c}{a^2+b^2+c^2}$$ $$=> a^2+b^2+c^2 = c \tan(\alpha)$$

Similarly, the third equation becomes:

$$\tan(\frac{\pi}{2}-\beta) = \frac{b}{a^2+b^2+c^2}$$ $$=>a^2+b^2+c^2=b\tan(\beta)$$

This makes it three equations in three unknowns ($a,b,c$). It's a system of quadratic equations. One way to solve them would be to use Buchberger's algorithm, which can solve an arbitrary system of Polynomial equations. See section 2.7 here and the python package, sympy implements it. See here section on solving polynomial equations. Although I'd recommend the python library, I also implemented this algorithm in C# a while back. See here.