MATLAB: How to find the area of a triangle given 3 vertices

areatriangle

By using MATLAB find the area of the triangle with vertices (3,1,0), (1,1,1) and (0, -2,-1).
I tried using polyarea, sounds good, doesn't work, never gonna happen.

Best Answer

  1. Pick one vertex, let say V1, as "origin"
  2. Get the two vectors of from this point to the other two points (V2-V1) and (V3-V1)
  3. Calculate the cross product between these two vectors
  4. The magnitude of this cross product is half the size of your triangle
More info? Google is your friend ...