# Thread: calculate perpendicular height of random triangle

1. ## calculate perpendicular height of random triangle

how can i calculate the perpendicular height of random triangle where i have the 3 points (x+y) for the corners + also the angles for each corner?

ideally i need to know how to calculate the area of any triangle using just the properties above, but how to calculate perpendicular height will do.

thanks for your help

2. Originally Posted by .paul.
how can i calculate the perpendicular height of random triangle where i have the 3 points (x+y) for the corners + also the angles for each corner?

ideally i need to know how to calculate the area of any triangle using just the properties above, but how to calculate perpendicular height will do.

thanks for your help
If the 3 corners are given by: $P_1(x_1 , y_1)\ ,\ P_2(x_2 , y_2)\ ,\ P_3(x_3 , y_3)$ then the area of the triangle can be calculated by:

$A=\dfrac12\left(x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \right) = \dfrac12 \cdot \left|\begin{array}{ccc} x_1&y_1&1 \\ x_2&y_2&1 \\ x_3&y_3&1 \end{array} \right|$

3. that works great with pixels, but i need to convert the output to cm squared.
heres how i convert a pixel line length to cm:

(pixels / gr.DpiX) * 2.54 where gr.DpiX is dots per inch in the graphics object.

but that doesn't convert pixels squared to cm squared.
any ideas?

thanks again

4. Originally Posted by .paul.
that works great with pixels, but i need to convert the output to cm squared.
heres how i convert a pixel line length to cm:

(pixels / gr.DpiX) * 2.54 where gr.DpiX is dots per inch in the graphics object.

but that doesn't convert pixels squared to cm squared.
any ideas?

thanks again
The questin you originally posted has been answered. But it looks like the question you posted is not the question you wanted answered. In which case, it might help if you posted what the actual question is.

5. Originally Posted by mr fantastic
The questin you originally posted has been answered. But it looks like the question you posted is not the question you wanted answered. In which case, it might help if you posted what the actual question is.
that is the full question, in the 2 posts

6. Originally Posted by .paul.
that is the full question, in the 2 posts
1. It would save time and effort if the actual full question had been posted in your first post.

2. Post #3 does not shed complete light on what the full and actual question is.

7. Originally Posted by .paul.
that works great with pixels, but i need to convert the output to cm squared.
heres how i convert a pixel line length to cm:

(pixels / gr.DpiX) * 2.54 where gr.DpiX is dots per inch in the graphics object.

but that doesn't convert pixels squared to cm squared.
any ideas?

thanks again
Just convert the pixel coordinates to cm, then apply the method given, and the answer will be in square centimetres.

CB