SHARE
TWEET

Untitled

a guest Jan 20th, 2020 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear all;
  2. y_1 = 1;
  3. do0 = 15;
  4. f = 10;
  5. v_1 = 0;
  6. v_2 = -(y_1/do0);
  7. v_3 = -(y_1/(do0-f));
  8. ro1 = [y_1; v_1];
  9. ro2 = [y_1; v_2];
  10. ro3 = [y_1; v_3];
  11. z_1 = 25;
  12. z_2 = 30;
  13. z_3 = 35;
  14.  
  15. [detS1, ri1] = Ray_s(ro1, do0, f, z_1);
  16. [detS2, ri2] = Ray_s(ro2, do0, f, z_1);
  17. [detS3, ri3] = Ray_s(ro3, do0, f, z_1);
  18.  
  19. x = [-do0,0,z_1];
  20. y1 = [y_1, y_1 + (v_1 * do0) , ri1(1)];
  21. y2 = [y_1, y_1 + (v_2 * do0) , ri2(1)];
  22. y3 = [y_1, y_1 + (v_3 * do0) , ri3(1)];
  23.  
  24. plot(x,y1,'r')
  25. hold on
  26. grid on
  27. plot(x,y2,'g')
  28. plot(x,y3,'b')
  29. plot([0 0],[3 -3],'y')
  30. plot(-do0,y_1,'m*')
  31. %quiver(-do0, y_1, do0, 0, 0,'r')
  32. %quiver(0, y_1 + (v_1 * do0), z_1, ri1(1), 0,'r')
  33. hold off;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top