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.
VinniUSMC at the rescue !
ASSIGN/SURFACE=SUM(SQRT(DOT(V5,V5))*SQRT(DOT(V6,V6))*SIN( DEG2RAD(ANGLEBETWEEN(V5,V6))))/2 !!!!!!!
V4 is the centroid of the scan, V5 and V6 are 2 arrays of vectors between hits and the centroid.
SQRT(DOT(V5,V5)) is an array of length of vectors, same for V6.
The norm of a cross product is also the area of the parallelogram formed by both vectors, and its (length of V5)*(length of V6)*(sin of anglre between V5 and V6) (math definition)
Thanks a lot Vinni !!!!!
(CTRL + C ; CTRL + V is sometimes too easy )
VinniUSMC at the rescue !
ASSIGN/SURFACE=SUM(SQRT(DOT(V5,V5))*SQRT(DOT(V6,V6))*SIN( DEG2RAD(ANGLEBETWEEN(V5,V6))))/2 !!!!!!!
V4 is the centroid of the scan, V5 and V6 are 2 arrays of vectors between hits and the centroid.
SQRT(DOT(V5,V5)) is an array of length of vectors, same for V6.
The norm of a cross product is also the area of the parallelogram formed by both vectors, and its (length of V5)*(length of V6)*(sin of anglre between V5 and V6) (math definition)
Thanks a lot Vinni !!!!!
(CTRL + C ; CTRL + V is sometimes too easy )
Ahh, you're calculating the sums of the areas of a series of parallelograms and then dividing that sum by 2 to turn the "sum-parallelogram" into "area of a triangle", which should be nearly equivalent to the area of the shape, regardless of the shape. Interesting, out-of-the-box thought process. Super@JEFMAN to the rescue.
VinniUSMC, one of the "enhancements" should be a real cross product calculation.
Cross product of PC-DMIS gives a unit vector, but the real cross product gives interested results, like the area.
Thanks for your compliments !
JEFMAN Would it be possible (maybe even slightly easier) to adapt the Shoelace Formula (
https://en.wikipedia.org/wiki/Shoelace_formula) to this? Then you could focus on the centroid and any pair of consecutive points (although both methods are skipping the area of the triangle given by the vertices (centroid, first point, last point)).