I am measuring a feature that is somewhat round but has lot of jagged edges. I want to use all of the areas to calculate the area. I am measuring this using hundreds of points. Anyone have any ideas ? I have searched for answers but can't seem to come up with any.
I was wondering where the formula came from…
So I searched a little, and found the explanation.
To explain the way, I must begin by the start.
There are two kinds of products with vectors, the dot product (or scalar product) whose result is a number, and cross product (or vectorial product) whose result is a vector, perpendicular of both vectors of the product.
The “cross product” name comes from the way to realize it.
The vectors are written in columns:
The result of product between i and j values is written on k line, j and k on i line and k and i on j line.
If the product is made on the XY plane, the result is along Z.
In this case, A
k and B
k are zero, so the only non zero value of the product is C
k.
Therefore, the length of the vector result is :
It’s also (by definition) the area of the constructed parallelogram.
The Shoelace formula, given in 2D, so in XY plane, the vectors are written from the extremes coordinates:
Applying xi yi to A and B, it gives :
The Shoelace formula is “just” a simplification of the cross product, available in 2D only…