|
[Sponsors] |
June 1, 2001, 15:27 |
area of triangle
|
#1 |
Guest
Posts: n/a
|
How do I find the area of a triangle in 2-D if I know the coordinates of the corners?
|
|
June 1, 2001, 15:36 |
Re: area of triangle
|
#2 |
Guest
Posts: n/a
|
use Heron's law:
a^2 = s(s-a)(s-b)(s-c) a=area a,b,c = side lengths s=0.5*(a+b+c) (works well for 3-d too) |
|
June 1, 2001, 15:38 |
Re: area of triangle
|
#3 |
Guest
Posts: n/a
|
||
June 1, 2001, 18:05 |
Re: area of triangle
|
#4 |
Guest
Posts: n/a
|
The three vertices are ordered in counterclockwise order, (x1,y1), (x2,y2), (x3,y3). Then,
S=0.5*(x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2)) which can be derived easily by computing a cross product of a parir (any pair) of the side vectors. Bye |
|
June 1, 2001, 19:38 |
Re: area of triangle
|
#5 |
Guest
Posts: n/a
|
Aha! Thanks.
|
|
June 2, 2001, 10:33 |
Re: area of triangle
|
#6 |
Guest
Posts: n/a
|
Hi
The very best way to do it is to calculate the cross product using two vectors (sharing the same origen)(one of the corner vertex of the triangle) which forms the edges of the triangle. Half the norm of the resulting vector will give ya the surface area AND by doing so you already calculated a normal to the surface which ye want anyhow. Just make sure your convention is correct, otherwise your normal vector might point in the wrong direction. Cheers Barry |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with reference area | alfaben | STAR-CCM+ | 3 | April 21, 2020 10:46 |
Non overlap area fractions | saisanthoshm88 | CFX | 11 | September 17, 2015 19:42 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
CFX Solver Memory Error | mike | CFX | 1 | March 19, 2008 08:22 |
Area, triangle, Earth | Jon | Main CFD Forum | 2 | April 25, 2005 09:43 |