## NSC Angle of Incidence from Ray Database Viewer

This article shows the steps for calculating the AOI based on the LMN direction cosine of a ray and the Normal vector of the surface at the intersection point.  There is a provided ZPL macro will will automatically calculate this information for the user from a ZRD file loaded in a Ray Database Viewer.

Authored By: Michael Humphreys

Published On: 2月 14, 2017

## How to Use the PLOT2D Keyword in ZPL

This article describes use of the PLOT2D keyword for generating graphical displays of 2D numerical data in Zemax. Examples are provided to demonstrate use of the keyword, and its application in creating through-focus PSF plots.

Published On: 6月 24, 2008

## ZPL Macro for Scaling the Weight of a Range of Optimization Operands

This article introduces a quick and simple macro that can be used to scale the weighting of a range of optimization operands.

Authored By: Dan Hill

Published On: 9月 24, 2015

## How to Modify String Variables in ZPL Macros

• How to use the $LEFTSTRING(A$, n) and $RIGHTSTRING(A$, n) string fuctions
• How these functions can be combined together to effectively scan and modify string variables

Authored By: Andrew Locke

Published On: 8月 23, 2006

## How To Use the ZRDPLAYBACK Keyword To Obtain Filtered Results

This article describes use of the ZPL keyword ZRDPLAYBACK to restore data from a previously saved ZRD file onto detectors in a non-sequential system. Analysis of the data can then be undertaken using the standard non-sequential functions (e.g. NSDD, NSDE, etc.). Using ZRDPLAYBACK, the saved data may be optionally filtered prior to analysis.

Published On: 6月 29, 2011

## How to Set Solves from ZPL

This article describes a brief ZPL code snippet written to save the user from some tedious keyboard data entry.

Authored By: Mark Nicholson

Published On: 12月 16, 2015

## How to Manipulate BMP and JPG files Using the IMAGEEXTRACT and IMAGECOMBINE Keywords

This article explains how images can be spliced and merged together in Zemax using the IMAGEEXTRACT and IMAGECOMBINE keywords. An example illustrating how these tools can be used to model a document scanner is also provided.

Published On: 5月 2, 2008

## How to Open Consecutively-Named Lens Files Using a ZPL Macro

This article demonstrates how to open several lens files using the ZPL macro. This is often useful for analyzing lens files generated by Zemax during the Monte Carlo tolerance analysis.

Authored By: Nam-Hyong Kim, Updated by Michael Humphreys

Published On: 8月 24, 2006

## How to Measure the Sag of an NSC Object

This article describes how to measure the surface sag of a non-sequential object using the NSRA operand.

Published On: 11月 23, 2007

## How to Obtain the Value for Any Optimization Operand in a ZPL Macro Using OPEV and OPEW

This article provides a brief explanation on how to use the OPEV() and OPEW() functions to obtain a value that would otherwise be given by a merit function operand.