Calculate the Orthocenter of a Triangle Try to write the shortest program or function you can that prints or returns the calculated orthocenter of a triangle. 

The orthocenter of a triangle is the intersection point of the three altitudes of a triangle. The altitude of a triangle is a perpendicular segment from the vertex of the triangle to the opposite side.



Input:


Three points in 2D space correponding to the triangle's vertices


Output:


The calculated orthocenter of the triangle


A sample input would be 

A(0,0)
B(3,6)
C(6,0)


and a sample output would be:

Calculated Othocenter (3, 1.5)


One formula for orthocenter can be written as 

(x, y) = ((ax*tan(α) + bx*tan(β) + cx*tan(γ))/(tan(α) + tan(β) + tan(γ),
          (ay*tan(α) + by*tan(β) + cy*tan(γ))/(tan(α) + tan(β) + tan(γ))


Shortest program in bytes wins.
Python, 193 168
Should work for any valid triangle...
def h(a,A,b,B,c,C):
 if A==B:b,B,c,C=c,C,b,B
 m=(a-b)/(B-A)
 return m,C-m*c
def f(a,A,b,B,c,C):
 m,q=h(a,A,b,B,c,C)
 k,z=h(c,C,b,B,a,A)
 x=(q-z)/(k-m)
 return (x,k*x+z)