area_quad.m
SYNTAX: area = area_quad(center,corners,rotate_angle)
PURPOSE: calculate area of quadrilateral
INPUT:
center = center of mass of quadrilateral
corners = 2 x 4 matrix of quadrilateral corners ([x,y] x 4)
rotate_angle = angle of centerline of quad from positive x-axis, to
be used to rotate onto x-axis
OUTPUT:
area = approximate area of quadrilateral
RESTRICTIONS: Requires rotation to "center" the quad on x-axis.
METHOD: Rotates quad to put 2 vertices each above and below axis. Area is
approximated by using trapezoid area formula on shape above and below axis.
Dependencies