beam.k=[-1,0]; beam.origin=[2,0.5]; beam.face=NA; face1.vertex1=[-1,0]; face1.vertex2=[1,0]; face1.n_right = 1; face1.n_left= 1.5; face2.vertex1=[1,0]; face2.vertex2=[0,1]; face2.n_right = 1; face2.n_left= 1.5; face3.vertex1=[0,1]; face3.vertex2=[-1,0]; face3.n_right = 1; face3.n_left= 1.5; faces={face1,face2,face3}; border1.vertex1=[-5,-5]; border1.vertex2=[5,-5]; border1.n_right = 1.; border1.n_left= 1; border2.vertex1=[5,-5]; border2.vertex2=[5,5]; border2.n_right = 1.; border2.n_left= 1; border3.vertex1=[5,5]; border3.vertex2=[-5,5]; border3.n_right = 1.; border3.n_left= 1; border4.vertex1=[-5,5]; border4.vertex2=[-5,-5]; border4.n_right = 1.; border4.n_left= 1; borders={border1,border2, border3, border4}; beams={beam}; beam_trace(beams, faces, borders )