# Find point in 3D space based on start point, three angles and a distance (need example)

I know this has been asked before but the answer wasn't very helpful, sorry. I need an example and to see each step of the equation being solved. Let's say we have 45 degree angles to each axis and starting at point A(0,0,0). If the distance is 2 what are the coordinates of point B?

• you can't have 45 degree angles to each axis. They have to add up to 180. – Robert Mastragostino May 24 '12 at 12:50
• A point in 3D space is specified by three pieces of data. In your case you need two angles and a distance. In spherical coordinates two angles are sufficient to specify a location on the sphere, and the radius of the sphere scales each coordinate in cartesian space. – half-integer fan Jan 2 '13 at 1:53

First, let's put B'' 2 units away at angle 0; explicitly B''(2,0,0). Since we know B is $45^\circ$ away from the $x$-axis, we know by basic trig that B'$(\sqrt{2},\sqrt{2},0)$.
From there, we say, okay; if it's also $45^\circ$ from the $z$-axis, then how do we get that? The $z$-coordinate just gets $\cos(45^\circ)=\sqrt{2}$ (If you draw the picture, you can see the side adjacent to the angle is on the $z$-axis). Similarly, the radius in the $xy$-plane needs to be scaled to "lift" B' into B; the scale factor naturally should be $\sin(45^\circ)=\sqrt{2}$; because the scaling must happen in both directions, we have:
B$(\sqrt{2}\sqrt{2}, \sqrt{2}\sqrt{2}, \sqrt{2}) =$ B$(2,2,\sqrt{2})$.
The trick is being careful about which angle represents each direction, and making sure your sines and cosines work under the conventions you're using. Of course, with $45^\circ$, you can be a lot sloppier; however the method I used will work for general angles (with adjustments for sign).