Refraction of light at a surface in 3D vector form
104 download
Aggiornato 1 ott 2020

Visualizza la licenza

Implementation of tutorial found on

s2 = snell3d(n1,n2,s1,N)
n1,n2: refractive indexes of first medium and surface respectively
s1: incident ray vector (xyz vector, will be normalized and made column)
N: surface normal (xyz vector, will be normalized and made column)
s2: refracted ray (normalized xyz vector)

Cita come

Duijnhouwer (2024). snell3d (, MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2020a
Compatibile con R2019b e release successive
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release

added icon


Fixed bug where function relied on idiosyncratic normalize function that happened to reside on my path!


Made sure vector 2-norm is used for normalization


Examples in help