snell3d

version 1.2.1 (1.35 KB) by Duijnhouwer
Refraction of light at a surface in 3D vector form

47 Downloads

Updated 1 Oct 2020

View License

Implementation of tutorial found on
http://starkeffects.com/snells-law-vector.shtml

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)

Cite As

Duijnhouwer (2022). snell3d (https://www.mathworks.com/matlabcentral/fileexchange/80422-snell3d), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with R2019b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!