SHARE
TWEET

Untitled

a guest Apr 25th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function [] = hermit(P00,P01,P10,P11, R000, R001, R010, R011, R100, R101, R110, R111, TW00, TW01, TW10, TW11)
  2.  
  3. Gx = [
  4.         P00(1),  P01(1),  R001(1), R011(1);
  5.         P10(1),  P11(1),  R101(1), R111(1);
  6.         R000(1), R010(1), TW00(1), TW01(1);
  7.         R100(1), R110(1), TW10(1), TW11(1)
  8.     ];
  9.  
  10. Gy = [
  11.     P00(2),  P01(2),  R001(2), R011(2);
  12.     P10(2),  P11(2),  R101(2), R111(2);
  13.     R000(2), R010(2), TW00(2), TW01(2);
  14.     R100(2), R110(2), TW10(2), TW11(2)
  15. ];
  16.  
  17. Gz = [
  18.     P00(3),  P01(3),  R001(3), R011(3);
  19.     P10(3),  P11(3),  R101(3), R111(3);
  20.     R000(3), R010(3), TW00(3), TW01(3);
  21.     R100(3), R110(3), TW10(3), TW11(3)
  22. ];
  23.  
  24. M = [2 -3 0 1;-2 3 0 0;1 -2 1 0;1 -1 0 0];
  25. s=[0:0.1:1];
  26. t=[0:0.1:1];
  27. t3 = t.^3;
  28. t2 = t.^2;
  29. t1 = t.^1;
  30. t0 = t.^0;
  31. s3 = s.^3;
  32. s2 = s.^2;
  33. s1 = s.^1;
  34. s0 = s.^0;
  35.  
  36. T = [t3; t2; t1; t0];
  37. S = [s3; s2; s1; s0];
  38.  
  39. Qx = S'*M'*Gx*M*T;
  40. Qy = S'*M'*Gy*M*T;
  41. Qz = S'*M'*Gz*M*T;
  42.  
  43.  
  44. axis equal;
  45. figure
  46. mesh(Qx,Qy,Qz)
  47.  
  48. end
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