Calculates the signed area of a simple polygon.


icon

Inputs/Outputs

  • c1ddbl.png X

    X specifies the x-coordinates of the vertices of the polygon. The length of X must be greater than or equal to 3.

  • c1ddbl.png Y

    Y specifies the y-coordinates of the vertices of the polygon. The length of Y must equal the length of X.

  • idbl.png signed area

    signed area returns the signed area of the polygon. The signed area is positive if the vertices of the polygon are in counterclockwise order. Otherwise, signed area is negative.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • A simple polygon is a polygon with no boundaries that cross each other. The following equation defines the signed area of a simple polygon with n vertices.

    where (xi, yi) is the ith vertex and (xn, yn) = (x0, y0).