function drawsys(ap,th,cv,lp) % DRAWSYS(AP,TH,CV,LP) % % draws a lens system % % AP aperture height % TH thickness % CV curvature % LP index of first surface of each lens ts = cumsum(th); for k=lp drawlens(ap(k),th(k),cv(k:k+1),ts(k-1)); hold on; end axis equal; hold off; clear k ts;