# Thread: 3rd Point of A Triangle

1. ## 3rd Point of A Triangle

First off I'm not entirely sure this is a trig question. If it's in the wrong place could a moderator maybe move it? Using trig was just my inital thought on how to solve this problem but I could be extremely wrong.

So I'm a programmer and I'm working in 3D space. This is the problem I need to solve.

I have the points of A and B. I also have access to all the distances of all three sides of the triangle. All I need to do is find C. Basically I want the point perpindular to AB, that is a fixed distance away, directly above (or below) C. I feel like I'm missing something really simple but I just can't figure out what.

This would be a fairly simple problem to solve with some graph paper and a ruler but because this is for a computer program I need it to be in the form of some sort of equation that it will understand. It also needs to work for different values of A and B.

Thanks for any help. As I said please move this topic if I'm in the completely wrong area.

2. Originally Posted by Silverlode
First off I'm not entirely sure this is a trig question. If it's in the wrong place could a moderator maybe move it? Using trig was just my inital thought on how to solve this problem but I could be extremely wrong.

So I'm a programmer and I'm working in 3D space. This is the problem I need to solve.

I have the points of A and B. I also have access to all the distances of all three sides of the triangle. All I need to do is find C. Basically I want the point perpindular to AB, that is a fixed distance away, directly above (or below) C. I feel like I'm missing something really simple but I just can't figure out what.

This would be a fairly simple problem to solve with some graph paper and a ruler but because this is for a computer program I need it to be in the form of some sort of equation that it will understand. It also needs to work for different values of A and B.

Thanks for any help. As I said please move this topic if I'm in the completely wrong area.
You can build an equation system and solve it for XA, YA, YZ:

I: (XA-XB)²+(YA-YB)²+(ZA-ZB)²=|AB|²
II: (XA-XC)²+(YA-YC)²+(ZA-ZC)²=|AC|²
Pythagoras: III: (XA-XB)²+(YA-YB)²+(ZA-ZB)²=[(XA-XC)²+(YA-YC)+(ZA-ZC)²]+|BC|²

PS: I believe you are going to obtain more than one unique point for A because you have a 3D coordinates system.

3. Thanks for the answer. It seems like your answer would work on paper however it it may be quite difficult for coding purposes. Hopefully it proves useful for someone else.

I actually came up with a better and easier to code approach in the last few hours for what I wanted to achieve. I ended up ditching the whole triangle concept altogether. Thanks very much anyway though.