Closed JLBegin closed 11 months ago
Yes this is also an issue with the Python implementation. I will fix it inside #99 .
This will have no effect on accuracy. The "position == vertex" case is triggered when the length difference if smaller than 1e-6 which is close to the limit of single precision float (1e-7). Converting this position shift 'dx' to a value of angle shift will result in a smaller difference (sin(theta)=dx/r). The error falls under float precision with a radius over 1e-5, which is far from operating conditions.
Issue also known as "pencil rays passing through sphere without intersecting".
Normal smoothing resulted in a NaN normal when incident on a vertex. Fixed by taking the vertex normal when the intersection point is too close to the vertex.
This was an issue when creating a sphere at the origin, with a pencil source propagating along Z. The rays were all passing through some of the primary icosphere mesh vertices (0, 0, -R) and (0, 0, R). The error resulted in the photons passing through without intersecting.