Jashcraf / Polarization-Raytrace

development repository for polarization raytracing based tools
1 stars 3 forks source link

Changing zos-api batch ray trace to global coordinates #2

Open Jashcraf opened 2 years ago

Jashcraf commented 2 years ago

Turns out you need to do this surface-by-surface, how unfortunate. The information in this issue was found in this knowledgebase article. You essentially use the GetGlobalMatrix() method of the Lens Data Editor ZOSAPI.Editors.LDE.ILensDataEditor to return the rotation matrix and offset shown below.

image

Here are the conversions to the tilts in Zemax image

After talking with Ramya it looks like we will also need a way to re-define the direction cosine vectors for cases where the optical axis direction changes.

Jashcraf commented 2 years ago

Update They lied its just TheSystem.LDE.GetGlobalMatrix(surfacenumber)

Jashcraf commented 2 years ago

And this approach doesn't appear to work

Jashcraf commented 2 years ago

image These are the rotation matrices and offsets for the case of a parabola going to focus. But the function appears to return an array of zeros for all outputs ... something weird is going on here.