From 4943c1cb5d453dd08aab0ec7000f094779178c94 Mon Sep 17 00:00:00 2001 From: Matt Argao Date: Mon, 11 Mar 2013 15:45:27 -0400 Subject: Prototype revised gbeam propagation. --- gaussian_focus.m | 9 +++++++++ self_gbeam_propagation.m | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 gaussian_focus.m create mode 100644 self_gbeam_propagation.m diff --git a/gaussian_focus.m b/gaussian_focus.m new file mode 100644 index 0000000..ff444ee --- /dev/null +++ b/gaussian_focus.m @@ -0,0 +1,9 @@ +function [ w, s ] = gaussian_focus( w0, s0, f, lambda ) +%GAUSSIAN_FOCUS Summary of this function goes here +% Detailed explanation goes here + +zR = pi*w0^2/lambda; +s = f*(1+(s0/f-1)/((s0/f-1)^2+(zR/f)^2)); +w = w0/sqrt((1-s0/f)^2+(zR/f)^2); +end + diff --git a/self_gbeam_propagation.m b/self_gbeam_propagation.m new file mode 100644 index 0000000..807303c --- /dev/null +++ b/self_gbeam_propagation.m @@ -0,0 +1,48 @@ +function [ output_args ] = self_gbeam_propagation( w0, x_lens, f, x0, lambda ) +%SELF_GBEAM_PROPAGATION Summary of this function goes here +% Detailed explanation goes here + +n_lens = 3; + +w = w0; +w_pos = x0; + +for i = 1:n_lens + x_from_next_lens = x_lens(i) - w_pos(i); + [w_new, s_new] = gaussian_focus(w(i), x_from_next_lens, f(i), lambda); + w(i+1) = w_new; + w_pos(i+1) = x_lens(i) + s_new; +end + +x_pos= x_lens; +x(1)=w_pos(1); +waist_prop(1)=w(1); + +x_temp=linspace(x0 ,x_pos(1)); +waist_prop=[waist_prop w(1)*sqrt(1+((x_temp-w_pos(1))/(pi*w(1)^2/lambda)).^2)]; +x=[x x_temp]; + +for i=1:n_lens + if i == 3 + break + end + x_temp=linspace(x_pos(i),x_pos(i+1)); + waist_prop=[waist_prop w(i)*sqrt(1+((x_temp-w_pos(i))/(pi*w(i)^2/lambda)).^2)]; + x=[x x_temp]; +end + +x_temp=linspace(x_pos(end),x_pos(end)+abs(f(end))); +waist_prop=[waist_prop w(end)*sqrt(1+((x_temp-w_pos(end))/(pi*w(end)^2/lambda)).^2)]; +x=[x x_temp]; + + +figure(1) +plot(x,waist_prop,'r',x,-waist_prop,'r'); + + + + + + +end + -- cgit v1.2.3