Display MoreRe: Calculate Polygon Area

Aaron, I updated the code in the thread when calculating the area of the polygon...

http://www.ozgrid.com/forum/sh…d.php?p=322975#post322975

You were right - there was some rounding errors when the numbers were being

displayedin both the cells of the worksheet and the segment line lengths. These are now fixed (3 decimal places), but the area that the code was caluclating was correct (based on the numbers it had in the node points). So the formula wouldappearto be right

Take note though, that if you rotate a square (or rectangle) through about 45 degrees, the 90 degree corner on the shape becomes either 89.9 or 90.1... this effects the segment lengths and hence the area of the shape, so you will get a slightly different area for a rotated polygon. I am inclined to think this has more to do with how Excel rotates the image as opposed to an error in Andy's trig. calculations for caculating the angles that each line in the polygon makes. It could be fixed by a Round statement, but this is probably introducing a fix for something that is arguably not broken.

Cheers

Ger

Hi Ger - the link to the the post above appears no longer valid. are you able to share again? NB I think I have an old file by you named "shapes measure area 48347_Ger" but I think I may have broken part it. I wonder if that is still available. Many thanks in advance.