Send
Close Add comments:
(status displays here)
Got it! This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Area of a triangle
1. Area of a triangle
Problem: You are given three points in a plane that determine a triangle.
#0: (x0, y0)
#1: (x1, y1)
#2: (x2, y2)
Assume they are not the same points.
Determine:
the area of the triangle
the direction of the points: clockwise or counter-clockwise
2. Clockwise
How is the direction clockwise determined?
3. Derivation
omitted - to be supplied later
4. Translation
First, translate the points to the origin by subtracting point 0 from point 1 and point2
#0: (x0-x0, y0-y0) = (0,0)
#1: (x1-x0, y1-y0)
#2: (x2-x0, y2-y0)
5. Redefinition
Let the following hold:
dx1 = x1-x0
dy1 = y1-y0
dx2 = x2-x0
dy2 = y2-y0
6. Formula
The formula for the area of the triangle is as follows.
area = 0.5 * ((dx1 * dy2) - (dx2 * dy1))
This is known as the cross product of the vectors [dx1, dy1] and [dx2, dy2].
If the area is positive, the points go counter-clockwise from point 0 to point 1 to point 2.
If the area is negative , the points go clockwise from point 0 to point 1 to point 2.
7. End of page