Input: incident ray parameters , surface control points , refractive indices | Output: outgoing ray parameters | 1: function TRACE() | 2: | 3: | 4: get surface normal vectors | 5: get refraction directions by Eq. (14) | 6: get reflectances and based on Eq. (15) | 7: | 8: | 9: return | 10: end function | 11: function INTER() intersection acquisition | 12: generate rough mesh grids | 13: | 14: | 15: | 16: | 17: initial solution | 18: , | 19: whiledo is the allowed error | 20: | 21: | 22: get Jacobian matrix J by Eqs. (9) and (12) | 23: get by Eq. (13) | 24: | 25: | 26: end while | 27: return | 28: end function | 29: function NURBS() surface interpolation | 30: generate quasi-uniform node vectors and using shape () | 31: get based on Eq. (3) | 32: get interpolation points and the partial derivatives , while based on Eq. (2) | 33: return | 34: end function |
|