KPG1_ASGDP

Finds a position with good output co-ordinates within a given input region of a supplied Mapping

Description:

This routine finds a position which has good co-ordinates in the output Frame of the given Mapping, and is a significant distance from the origin of both input and output Frame. It returns both the input and output co-ordinates at this position. The position is constrained to lie within a specified box within the input Frame. The first point to be tested is the centre of the box. If this does not pass the tests described above, a set of 10000 points randomly distributed within the box is tested. An error is reported if no good position can be found.

Invocation

CALL KPG1_ASGDP( MAP, NDIM1, NDIM2, LBND, UBND, INPOS, OUTPOS, STATUS )

Arguments

MAP = INTEGER (Given)
The Mapping to use.
NDIM1 = INTEGER (Given)
The number of input co-ordinates.
NDIM2 = INTEGER (Given)
The number of output co-ordinates.
LBND( NDIM1 ) = DOUBLE PRECISION (Given)
The lower bounds of the test box, within the input Frame of the supplied Mapping.
UBND( NDIM1 ) = DOUBLE PRECISION (Given)
The upper bounds of the test box, within the input Frame of the supplied Mapping.
INPOS( NDIM1 ) = DOUBLE PRECISION (Returned)
The returned input co-ordinates at the selected position. There will be no AST__BAD values in this array.
OUTPOS( NDIM2 ) = DOUBLE PRECISION (Returned)
The returned output co-ordinates at the selected position. There will be no AST__BAD values in this array.
STATUS = INTEGER (Given and Returned)
The global status.