Solved
Exporting global coordinate of each surface in ZOS-API Matlab
Hello,
I'm studying the raytrace using ZOS-API and Matlab. I could get the raytrace results using Batch raytrace example. (example # 22)
The results show the each ray position(on the interesting surface) in local coordinate. If I want to convert this local coordinate to global, which way is best? I'm thinking of using global surface coordinate to use it as a reference for conversion. But, I cannot find the exporting global coordinate of the each surface as well. So my question is
1) Can the batch raytace result be exported in global coordinate?
2) How do I get the global coordinate of each surface?
Thanks in advance for your help!
I'm studying the raytrace using ZOS-API and Matlab. I could get the raytrace results using Batch raytrace example. (example # 22)
The results show the each ray position(on the interesting surface) in local coordinate. If I want to convert this local coordinate to global, which way is best? I'm thinking of using global surface coordinate to use it as a reference for conversion. But, I cannot find the exporting global coordinate of the each surface as well. So my question is
1) Can the batch raytace result be exported in global coordinate?
2) How do I get the global coordinate of each surface?
Thanks in advance for your help!
Best answer by Ali H
Hello,
You can convert local coordinates to global coordinates by using the GetGlobalMatrix method from the ILensDataEditor Interface:


For more information on the rotation matrix, you can check out this knowledgebase article:
https://my.zemax.com/en-US/Knowledge-Base/kb-article/?ka=KA-01638
I hope this helps!
View originalYou can convert local coordinates to global coordinates by using the GetGlobalMatrix method from the ILensDataEditor Interface:


For more information on the rotation matrix, you can check out this knowledgebase article:
https://my.zemax.com/en-US/Knowledge-Base/kb-article/?ka=KA-01638
I hope this helps!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.