I am working on a script that makes the checkers size of different objects same, so that artists dont have to manually scale all the UVs. For this I need to find the area covered in the UV space by the objects and the area of their geometry in 3D space. While there is a simple command for finding the geometry area, polyEvaluate -wa . I could not find any command to find the area of the space covered by their UVs, I made a function to find it, but its accuracy varies a lot.

Does anyone know any simpler, accurate way to do this

```
global proc float area(float $X_list[], float $Y_list[], int $numVertices) //returns polygon area when given xy coordinates
{
float $area=0;
int $i;
for($i=0;$i<$numVertices-1;$i++)
$area+= abs($X_list[$i]*$Y_list[$i+1] - $X_list[$i+1]*$Y_list[$i]);
$area+= abs($X_list[$numVertices-1]*$Y_list[0] - $X_list[0]*$Y_list[$numVertices-1]);
$area=$area/2;
return $area;
}
```