From 21ad89349d9f799ff6dfb9828d915797dd964e07 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Fri, 27 Sep 2013 15:39:13 -0400 Subject: added optics to abcd conversion --- optics2abcd.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 optics2abcd.m (limited to 'optics2abcd.m') diff --git a/optics2abcd.m b/optics2abcd.m new file mode 100644 index 0000000..44077cf --- /dev/null +++ b/optics2abcd.m @@ -0,0 +1,17 @@ +function abcd = optics2abcd( optics ) +% converts optics ellements to full abcd matrix +% assuming that the last position along propagation coinsides +% with the last optical element + +optics = arrange_optics_along_x( optics ); + +abcd = [1,0; 0, 1]; + +d=0; +N=length(optics); +for i=1:N + d=optics{i}.x - d; % distance between optical elements + abcd= optics{i}.abcd * abcd_free_space(d) * abcd; +end + +end -- cgit v1.2.3