> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example 02: NSC Ray Trace

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.

```csharp theme={null}
Input:      Non-sequential\Miscellaneous\Digital_projector_flys_eye_homogenizer.zos

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

[C#](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r1-sp01/page_ex02_cs.md)

[C++](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r1-sp01/page_ex02_cpp.md)

[Mathematica](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r1-sp01/page_ex02_nb.md)

[Matlab](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r1-sp01/page_ex02_m.md)

[Python](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r1-sp01/page_ex02_py.md)
