Question

ZPL vignetting using RAYV()


Hi! I’m trying to write a little for-loop that loops through various field angles, stop when vignetting occurs on any surface, however, somehow it doesn’t seem to ‘register’ vignetting. I’m confused why this is the case and how I should go about trying to solve it. Would appreciate any comments/suggestions/advice on this. Thank you!

My observation: For any max field in the loop > 179.9 deg, FLDY(1) and MAXF() would both give me 179.9 degrees. For any max field <= 179.9 deg, FLDY(1) and MAXF() would give me a value that correspond to the max field. Regardless of the max field in the loop, RAYV() would be printed as 0. I’ve tried it with RAYE() and I would get 0 regardless too. 

 

[Mod note: moved to more appropriate forum for ZPL-related discussions.] 


4 replies

Userlevel 3
Badge

Hello,

A quick read of your script, it seems like it should work. Do you have any fixed apertures in the system? If not, they will simply adjust for each field angle.

If you want to catch the vignetted system, you might want to remove lines 149,150

 

Hi John, 

Thank you so much for your reply. My clear aperture is fixed for all surfaces. 

I’m sorry I might not have been clear. My for-loop loops all the way to 200 deg. After the for-loop, the printed FOV = 179.9 deg. Given this, I thought at 200 deg, it should have gone to the ‘else’ portion of the if-else statement, and RAYV() should not have been 0 (and ‘VIGNETTED’ should have been printed). I’m confused why this isn’t the case. 

I’ve added the revised code where I printed the angles, as well as the output that I am getting (below).

Thank you. 

 

Userlevel 3
Badge

Hello, I copied what you have and it seems to work for me:
 

 

Hi John, 

Thank you for letting me know, I appreciate it. I’ll check on my end again. 

Sincerely, 
Xin-Yi

Reply