Skip to main content

ZOS-API interface 2024 R1

Example 02: NSC Ray Trace

Last update: 17.07.2025

Ex 2: A NSC sample file (…\Non-sequential\Miscellaneous\Digital_projector_flys_eye_homogenizer.zos) is opened, ray trace settings are modified, and then a ray trace is run. Ray trace progress is stored and displayed. After the trace, detector parameters (width, height, number of pixels, etc.) are extracted, as well as pixel data, and detector viewer is recreated and plotted.

Input:      Non-sequential\Miscellaneous\Digital_projector_flys_eye_homogenizer.zos

Output: Graph (Matlab, Python) API\e02_NSC_ray_trace.txt (C++, C#)

C#

C++

Mathematica

Matlab

Python

Connect with Ansys