How to find the coordinates where the altitude of a triangle intersects the base in 3 dimensions? Assuming I know three completely random coordinates in 3d space that correspond with vertices of a triangle, how can I then find the point at which the altitude intersects the base? I know how to calculate the side lengths of the triangle and have an idea of how to solve my problem, but I become stuck when challenged with finding the height of the altitude.
 A: Given a triangle with vertices $A, B, C$. Its three altitudes intersect at the orthocenter $H$. Since $H$ lies in the plane holding the three vertices $A,B,C$.
There exists $3$ real numbers $\alpha, \beta, \gamma$ such that
$$\vec{H} = \alpha \vec{A} + \beta \vec{B} + \gamma \vec{C}\quad\text{ and }\quad \alpha + \beta + \gamma = 1$$
The $3$-tuple $(\alpha,\beta,\gamma)$ is called the barycentric coordinate of $H$. They can be computed using the side lengths $a,b,c$ of triangle alone. For the most common triangle centers, you can look up their barycentric coordinates from wiki.
In particular, the orthocenter $H$ is given by
$$\alpha : \beta : \gamma =
\tan\angle A : \tan\angle B : \tan\angle C = 
\frac{1}{-a^2 + b^2 + c^2} : 
\frac{1}{a^2 - b^2 + c^2}  : 
\frac{1}{a^2 + b^2 - c^2}
$$
It is actually not that hard to deduce this formula ourselves. 
Since $H$ is lying on the altitude through $A$, $AH$ is perpendicular to $BC$. Notice
$$\vec{AH} = (\alpha \vec{A} + \beta\vec{B} + \gamma\vec{C}) - \vec{A}
 = \beta (\vec{B} - \vec{A}) + \gamma (\vec{C} - \vec{A} )
\quad\text{ and }\quad
\vec{BC} = \vec{C} - \vec{B}
$$
$AH \perp BC$ implies
$$ 
\beta (\vec{B} - \vec{A} )\cdot (\vec{C} - \vec{B}) + 
\gamma(\vec{C} - \vec{A} )\cdot (\vec{C} - \vec{B}) = 
- \beta c a\cos\angle B + \gamma b a\cos\angle C = 0
$$
Using the cosine rule for triangle, we find
$$\beta (a^2 + c^2 - b^2) = \gamma (a^2 + b^2 - c^2) 
\quad\iff\quad \beta : \gamma = \frac{1}{a^2-b^2+c^2} : \frac{1}{a^2+b^2-c^2}
$$
Other ratios like $\alpha : \beta$ and $\alpha : \gamma$ can be derived in a similar manner.
A: This problem becomes simple if you think about the triangle as a collection of vectors. Consider a triangle with points A, B, and C in 3-D space. Assume that your base is defined by the vector BC. In order to find the point where the altitude intersects the base, we simply take the dot product of one of the sides, say AB, and the base vector, BC. This will yield a vector pointing to the intersection of the altitude and the base from point B on the triangle (as we essentially calculated the projection of the route to the apex of the triangle onto the base). Then, to convert back to standard coordinates, simply add the vector OA, (O is the origin) to the vector $\lambda$BC (the projection we calculated), and you will get a vector pointing to the base of the triangle where the altitude intersects with respect to the origin.
A: I ended up figuring it out myself a few hours after my initial post, my method is as follows.
In this example I'm assuming the base of the triangle to be AB
Firstly, point D can be defined as any point plus the vector connecting them. One point we already have is point A, meaning $$D=A+ \vec{AD}$$. 
We can then find $\vec{AD}$ by scaling $\vec{AB}$ ($\vec{AB}=B-A$) by $\frac{AD}{AB}$. So, $$\vec{AD}=(\frac{AD}{AB})(\vec{AB})$$
So all that is needed now is the distance of the altitude and the distance of AB. AB we can figure out useing the following formula $$AB=\sqrt{\vec{AB.x}^2+\vec{AB.y}^2+\vec{AB.z}^2}$$
The distace of the altitude is all that is left to find. For this we know that altitude is equal to $2\frac{area}{base}$, in our case the base is AB and we are left to find the area of the triangle without the height, thankfully we have Herons Formula which gives us the area given 3 side lengths
$$s=\frac{AB+BC+CA}{2}$$
$$A=\sqrt{s(s-AB)(s-BC)(s-CA)}$$
By then plugging everything in we find point D
A: If $A,B,C$ are vertices, the vector $(\vec{AB}\times \vec{AC})\times \vec{BC}$ is in the plane $ABC$ and is perpendicular to $BC$. Write down the equation of line through $A$ parallel to this vector and find the point of intersection of this line with $BC$.
