Coordinates of orthocentre,circumcentre and incentre of a triangle formed in 3d plane The question is to find out the coordinates of orthocentre,circumcentre and incentre of a triangle formed in 3d plane.For the $2-d $ case it is easy to find out the point of intersection of altitudes of any two sides and report the point of intersection as the orthocentre of the triangle.But I could not figure out how to determine the coordinate of the orthocentre of a triangle formed in $3-d $ case i.e. whose coordinates are given as $(x_i,y_i,z_i)$   $i=1,2,3 $ for the three vertices of the triangle.I could find out the equation of the line joining the two points but could not proceed to find out the orthocentre.I then tried to find out the orthocenter of the projection of the triangle in $(xy,yz,zx)$ planes.But I have no idea on how to correlate between the orthocentres of the projected triangles to that of the original triangle.I tried using the same logic in circumcenter and incentre but could not complete.
Edit i have came to know that a specific  case of the above problem when the vertices are on the axes $(x,y,z)$ then the distance of the origin from the orthocentre of such a triangle is simply given by the perpendicular distance of the origin to the plane formed by the triangle.I could not justify the above fact.Any intuition as to why this should be true will be highly appreciated.
Can someone suggest a method to handle such triangles?Thanks.
 A: Barycentric coordinates provide a simple method. Let we assume that our triangle is $ABC$ and the side lengths are $a,b,c$. $a,b,c$ can be easily computed from the Pythagorean theorem, and the following barycentric coordinates
$$ I=[a,b,c],\qquad O=[a^2(b^2+c^2-a^2),b^2(a^2+c^2-b^2),c^2(a^2+b^2-c^2)]$$
$$ H=\left[\frac{1}{b^2+c^2-a^2},\frac{1}{a^2+c^2-b^2},\frac{1}{a^2+b^2-c^2}\right] $$
that we may summarize as $P=[p_a,p_b,p_c]$, give the vector identity
$$ P = \frac{p_a A+p_b B+p_c C}{p_a+p_b+p_c}$$
from which it is straightforward to compute the cartesian coordinates of $P$ from the coordinates of $A,B,C$. It is interesting to point out that Euler's theorem gives a further shortcut, since $3G=A+B+C=2O+H$ allows us to compute the coordinates of $H$ from the coordinates of $O$ (or the opposite) in a very simple way.

Here, as usual, $G,I,O,H$ stand for the centroid, incenter, circumcenter and orthocenter of a triangle. The derivation of their barycentric coordinates is straightforward from the computation of their trilinear coordinates, i.e. from the computation of their distances from the triangle sides in terms of $a,b,c$.

About your second question: up to reflections we may assume that $A$ lies on the positive $x$ axis, $B$ lies on the positive $y$ axis and $C$ lies on the positive $z$ axis. We are claiming that the projection of $O$ on the $ABC$-plane $\pi$ is given by the orthocenter of $ABC$. Let we denote such projection with $P$ and consider the plane $\pi_A$ through $O,A,P$. By minimality of $OP$, $\pi_A$ has to be orthogonal to the $BC$ line: otherwise, it would be possible to move a bit the $\pi_A$ plane and decrease the distance between $O$ and $\pi\cap\pi_A$. It follows that $\pi\cap\pi_A$ is orthogonal to $BC$, and by repeating the same argument we get that $P$ is the orthocenter of $ABC$.
A: This is a solution using cartesian coordinates. You can use the property by which, if we have a segment whose edge coordinates are given and a point that divides it into two parts,  the coordinates of the point can be obtained as the average of the edge coordinates, weighted by the lengths of the two opposite parts.  
Let $A$, $B $ and $C $ be the vertices of a triangle, and let  $ (x_1,y_1)$,$(x_2,y_2)$, and$ (x_3,y_3)$ be their coordinates, respectively. Let $\alpha,\beta, \gamma $ be the amplitudes of the corresponding angles. We can choose one side, for instance $AB $, and draw the height  from $C $ to its foot $D $ on $AB $,  identifying two parts $AD$ and $DB $. To determine the coordinates of the orthocentre $H $, we can first calculate the coordinates of $D $ by applying the property above to the two parts of the side $AB $. Then, we can calculate the coordinates of $H $ by applying the same property to the two parts of the height $CD $ identified by the orthocentre. 
Focusing initially on the $x $- coordinates, since $  \overline{ AD}=\overline{AC} \cos \alpha\,\, $ and $\overline {DB}=\overline{BC} \cos \beta \,\,$, then the $x $-coordinate of the point $D$  is 
$$\dfrac{x_1 \overline{DB}  +x_2 \overline {AD}}{\overline {AB}      }=  \dfrac{x_1 \overline{ BC}  \cos {\beta}+x_2 \overline {AC} \cos {\alpha}}{\overline {AB}      }$$ 
By a well known property of the orthocentre, if $R$ is the radius of the circumscribed circle, we have $\overline {CH}=2R\cos {\gamma} \,\,\,$. Also, we have $$\overline {HD}=\overline {AH} \cos {\beta}=  2R\cos {\alpha} \cos {\beta}\, \,\,\,$$  So the $x $-coordinate of the orthocentre $H $ is
$$ \small {\frac{  \cos {\gamma} \frac{x_1 \overline{ BC}  \cos {\beta}+x_2 \overline {AC} \cos {\alpha}} {\overline {AB}      } +  x_3\cos {\alpha} \cos {\beta}    }    {\cos {\alpha} \cos {\beta} + \cos {\gamma}}}$$
$$\small {= \dfrac{   x_1 \overline{ BC}  \cos {\beta}\cos {\gamma} +x_2 \overline {AC} \cos {\alpha} \cos {\gamma}    +x_3   \overline{AB} \cos {\alpha} \cos {\beta}    }    {\overline {AB}\cos {\alpha} \cos {\beta}+   \overline {AB} \cos {\gamma}}}$$
Because $\overline {AB}=\overline {AC}\cos {\alpha}+ \overline {BC}\cos {\beta}\,\,\,$, substituting in the denominator we have
$$ \small {\dfrac{   x_1 \overline{ BC}  \cos {\beta}\cos {\gamma} +x_2 \overline {AC} \cos {\alpha} \cos {\gamma}    +x_3   \overline{AB} \cos {\alpha} \cos {\beta}    }    { \overline {BC}\cos {\beta}\cos {\gamma}+  \overline {AC}\cos {\alpha}\cos {\gamma} +   \overline {AB}\cos {\alpha} \cos {\beta}}}$$
and dividing by $\cos {\alpha} \cos {\beta} \cos {\gamma}\,\,\,$,
$$\displaystyle  \dfrac{   \frac{ x_1 \overline{ BC} }{ \cos{\alpha}} +\frac{ x_2 \overline {AC}}{ \cos {\beta}}  +\frac{x_3   \overline{AB}}{\cos {\gamma}}     }    {\frac{\overline {BC}}{\cos {\alpha}} +\frac{  \overline {AC}}{\cos {\beta}}+ \frac{\overline {AB}}{\cos {\gamma} }}$$
Finally, using the law of sines, we can make the substitutions $$ \overline{ BC} =2R \sin {\alpha} \,\,$$ $$ \overline{AC} =2R \sin {\beta}\,\,\, $$ $$ \overline{ AB} =2R \sin {\gamma} \,\,\,$$ obtaining that the $x $- coordinate of the orthocentre $H $ is
$$\dfrac{x_1\tan {\alpha}+x_2\tan{\beta}+x_3\tan {\gamma}}{\tan {\alpha}+\tan{\beta}+\tan {\gamma}}$$
Using the same procedure, we can get that the $y $-coordinate of orthocentre $H $ is
$$\dfrac{y_1\tan {\alpha}+y_2\tan{\beta}+y_3\tan {\gamma}}{\tan {\alpha}+\tan{\beta}+\tan {\gamma}}$$
Note that the tangent of each angle can be easily obtained using the law of cosines.
A similar method can be used to find the coordinates of other points, e.g. the barycentre (for which the solution is trivially obtained by averaging coordinates), the circumcentre and the incentre. 
