diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-07-07 15:59:47 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-07-07 15:59:47 -0400 |
commit | 3af552966b27d17ffc6282afb01defda7d2f8155 (patch) | |
tree | 0baa94acfab566c93c540ef389649bfd0432e671 | |
parent | e44a0ee9e32819900d1aebaedd938655811b5143 (diff) | |
download | wgmr-3af552966b27d17ffc6282afb01defda7d2f8155.tar.gz wgmr-3af552966b27d17ffc6282afb01defda7d2f8155.zip |
small fixes
-rw-r--r-- | example.m | 1 | ||||
-rw-r--r-- | example_beam_trace.m | 31 |
2 files changed, 20 insertions, 12 deletions
@@ -1,6 +1,7 @@ beam.k=[1,-.5]; beam.origin=[0,0]; beam.face=NA; +beam.intensity=1; face.vertex1=[1.1,-1]; face.vertex2=[2.7,1]; diff --git a/example_beam_trace.m b/example_beam_trace.m index 997615d..889233e 100644 --- a/example_beam_trace.m +++ b/example_beam_trace.m @@ -1,45 +1,52 @@ beam.k=[-1,0]; beam.origin=[2,0.5]; beam.face=NA; +beam.intensity = 1; face1.vertex1=[-1,0]; face1.vertex2=[1,0]; face1.n_right = 1; -face1.n_left= 1.5; +face1.n_left= 2.5; face2.vertex1=[1,0]; face2.vertex2=[0,1]; face2.n_right = 1; -face2.n_left= 1.5; +face2.n_left= 2.5; face3.vertex1=[0,1]; face3.vertex2=[-1,0]; face3.n_right = 1; -face3.n_left= 1.5; +face3.n_left= 2.5; faces={face1,face2,face3}; -border1.vertex1=[-5,-5]; -border1.vertex2=[5,-5]; +border1.vertex1=[-2,-2]; +border1.vertex2=[2,-2]; border1.n_right = 1.; border1.n_left= 1; -border2.vertex1=[5,-5]; -border2.vertex2=[5,5]; +border2.vertex1=[2,-2]; +border2.vertex2=[2,2]; border2.n_right = 1.; border2.n_left= 1; -border3.vertex1=[5,5]; -border3.vertex2=[-5,5]; +border3.vertex1=[2,2]; +border3.vertex2=[-2,2]; border3.n_right = 1.; border3.n_left= 1; -border4.vertex1=[-5,5]; -border4.vertex2=[-5,-5]; +border4.vertex1=[-2,2]; +border4.vertex2=[-2,-2]; border4.n_right = 1.; border4.n_left= 1; borders={border1,border2, border3, border4}; beams={beam}; -beam_trace(beams, faces, borders ) + + +img=zeros(200,100); +border_limits=[-2,-2, 2,2]; +img = beam_trace(beams, faces, borders, border_limits, img ); + +plot_beams_and_faces_figure(border_limits, img, faces); |