|
|
Using the AXIS and EXTREMES POSITION commands in ASAP®, one can easily find the minimum and maximum radial coordinates of rays on a given surface. This is particularly useful when you have a non-rotationally symmetric distribution of rays on a surface and would like to find the radial position of the outer or innermost rays.
For example, if the surface of interest is in the XY plane, issue an AXIS Z command, followed by STATS POSITION and EXTREMES POSITION to determine the radial distance of the extreme rays from the Z axis. The AXIS Z command changes the coordinate system in which the STATS POSTION data is reported to cylindrical coordinates while the EXTREMES POSITION command reports the location of the extreme rays. If your script continues on, don't forget to reset your coordinate system to the global Cartesian coordinate system with AXIS OFF.
Example script:
UNITS MM
GRID ELLIPSE Z 0 -2 2 -4 4 101 101
SOURCE DIRECTION 0 0 1
SHIFT 20 30 0
RETURN
PIXELS 51
WINDOW Y -50 50 X -50 50
SPOTS POSITION
STATS POSITION
AXIS Z
STATS POSTION
EXTREMES POSITION
$GRAB 'Ray with MINIMUM R component' 1 1 RMIN
$GRAB 'Ray with MAXIMUM R component' 1 1 RMAX
$REG RMIN RMAX
AXIS OFF
该贴已经同步到 asdoptics的微博 |
|