Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [] = hermit(P00,P01,P10,P11, R000, R001, R010, R011, R100, R101, R110, R111, TW00, TW01, TW10, TW11)
- Gx = [
- P00(1), P01(1), R001(1), R011(1);
- P10(1), P11(1), R101(1), R111(1);
- R000(1), R010(1), TW00(1), TW01(1);
- R100(1), R110(1), TW10(1), TW11(1)
- ];
- Gy = [
- P00(2), P01(2), R001(2), R011(2);
- P10(2), P11(2), R101(2), R111(2);
- R000(2), R010(2), TW00(2), TW01(2);
- R100(2), R110(2), TW10(2), TW11(2)
- ];
- Gz = [
- P00(3), P01(3), R001(3), R011(3);
- P10(3), P11(3), R101(3), R111(3);
- R000(3), R010(3), TW00(3), TW01(3);
- R100(3), R110(3), TW10(3), TW11(3)
- ];
- M = [2 -3 0 1;-2 3 0 0;1 -2 1 0;1 -1 0 0];
- s=[0:0.1:1];
- t=[0:0.1:1];
- t3 = t.^3;
- t2 = t.^2;
- t1 = t.^1;
- t0 = t.^0;
- s3 = s.^3;
- s2 = s.^2;
- s1 = s.^1;
- s0 = s.^0;
- T = [t3; t2; t1; t0];
- S = [s3; s2; s1; s0];
- Qx = S'*M'*Gx*M*T;
- Qy = S'*M'*Gy*M*T;
- Qz = S'*M'*Gz*M*T;
- axis equal;
- figure
- mesh(Qx,Qy,Qz)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement