goptical
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Goptical] Rounding errors from skew rays in point source


From: Tim Saucer
Subject: [Goptical] Rounding errors from skew rays in point source
Date: Mon, 24 Jun 2013 11:33:44 -0400

Hi,

I've been working on a lens system and I wanted to include some rays coming 
from ~15 degrees off axis. However when I try to use the rayfan analysis 
routines I was getting an error in that it could not find the chief ray. 
Basically I was creating a point source at infinity with slope (0, sin(.262), 
cos(.262)). I traced the problem down to the fact that it was calculating an 
entrance height of 0.0199 for the chief ray. In analysis_rayfan.cc, 
find_chief_ray is looking for the ray that has an entrance height at the 
entrance pupil of < 1e-8.

I think I've tracked down what's happening. When the source is created at 
infinity, it's really located at -1e9*(slope). Then the process of tracing it 
to the entrance pupil is calculating the distance along that line which would 
ideally be exactly 1e9, giving an intercept of exactly (0,0,0) for an entrance 
pupil centered about the origin. However when we calculate this there is a 
difference due to the double storage. This leads to numerical artifacts, which 
can usually be ignored. However even at this 15 degree angle those small 
differences when multiplied by 1e9 lead to an intersect height of 0.0199, 
causing the rayfan analysis to quit saying there is no chief ray.

I've been able to get around this in three ways:

1) Change the value of -1e9 in sys_source_point.cc to -1e5. Doing this it keeps 
the intersect height for the chief ray down to ~2e-11 even for skew rays up to 
nearly vertical. However this leads to our point source not being so infinitely 
far away, and our approximation is less valid. (though probably sufficient for 
most cases).

2) Change the chief ray cutoff, or some combination of the chief ray cutoff and 
point source distance. This can lead to the problem of finding the wrong chief 
ray.

3) Change find_chief_ray to find the ray with the minimum entrance height. I'm 
not sure if we'd need some further error checking to ensure it is actually a 
chief ray. Maybe keep some cutoff but still take the smallest value.

I was wondering if anyone else had thoughts on this. Attached is a file I used 
to look though the intercepts.

Attachment: skew_ray.cpp
Description: Binary data


Best wishes,
Tim

Tim Saucer
Physics 236/241/261 Lead GSI
Sih Research Group PhD Candidate
Office: 4409 Randall, Lab: 1277 Randall
Department of Physics, University of Michigan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]