diff options
-rw-r--r-- | face_beam_interaction.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/face_beam_interaction.m b/face_beam_interaction.m index a94b2f2..2204bcc 100644 --- a/face_beam_interaction.m +++ b/face_beam_interaction.m @@ -59,7 +59,13 @@ function [is_face_hit, hit_position, hit_distance, new_beams] = face_beam_inter % draw beam x=beam.origin(1)+k(1)*t; y=beam.origin(2)+k(2)*t; - plot(x,y,'r-'); + if ( polarization == 1) + line_str='r-'; + else + line_str='b-'; + end + plot(x,y,line_str); + % find is beam arriving from left or right. I will use vectors cross product property. % if z component of the product 'k x kf' is positive then beam arrives from the left |