classdef Glass
    %Glass Defines optical glass in the optical system
    %   Detailed explanation goes here
    
    properties
    %standard data      
    Name % None for free space and the name of the glass for other cases 
    SellmeierCoefficients %[B1,C1,B2,C2,B3,C3]


    end
    
    methods 
    function [n] = getRefractiveIndex(Glass,wavLen) 
        BC = Glass.SellmeierCoefficients;
        n = computeRefractiveIndexFromSellmeierCoefficients (wavLen,BC(1), BC(2), BC(3), BC(4), BC(5), BC(6));
    end
    function [v] = getAbbeNumber(Glass,wavLenF,wavLenD,wavLenC)  %abbe number of glass computed from three n's
        BC = Glass.SellmeierCoefficients;
        nf = computeRefractiveIndexFromSellmeierCoefficients (wavLenF,BC(1), BC(2), BC(3), BC(4), BC(5), BC(6));         
        nd = computeRefractiveIndexFromSellmeierCoefficients (wavLenD,BC(1), BC(2), BC(3), BC(4), BC(5), BC(6));          
        nc = computeRefractiveIndexFromSellmeierCoefficients (wavLenC,BC(1), BC(2), BC(3), BC(4), BC(5), BC(6));
        v = (nd-1)/(nf-nc);
    end
    end
    
end

