#### Description:

This function returns a pointer to a new Polygon that contains a subset of the vertices in the supplied Polygon. The subset is chosen so that the returned Polygon is a good approximation to the supplied Polygon, within the limits specified by the supplied parameter values. That is, the density of points in the returned Polygon is greater at points where the curvature of the boundary of the supplied Polygon is greater.

#### Synopsis

AstPolygon ∗astDownsize( AstPolygon ∗this, double maxerr, int maxvert )

#### Parameters:

##### this

Pointer to the Polygon.

##### maxerr

The maximum allowed discrepancy between the supplied and returned Polygons, expressed as a geodesic distance within the Polygon`’` s coordinate frame. If this is zero or less, the returned Polygon will have the number of vertices specified by maxvert.

##### maxvert

The maximum allowed number of vertices in the returned Polygon. If this is less than 3, the number of vertices in the returned Polygon will be the minimum needed to achieve the maximum discrepancy specified by maxerr.

#### Returned Value

##### astDownsize()

Pointer to the new Polygon.

#### Notes:

- A null Object pointer (AST__NULL) will be returned if this function is invoked with the AST error status set, or if it should fail for any reason.

Copyright (C) 2021 East Asian Observatory