Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Q = func1(P0,P1,R0,R1)
- hold on
- u = [0:0.01:1];
- U = [];
- for u=0:0.01:1
- U = [U; u.^3 u.^2 u 1];
- end
- G = [P0(1) P1(1) R0(1) R1(1);
- P0(2) P1(2) R0(2) R1(2);
- P0(3) P1(3) R0(3) R1(3)];
- M = [2 -3 0 1;
- -2 3 0 0;
- 1 -2 1 0;
- 1 -1 0 0];
- Q = G*M*U'
- Q = Q'
- //Krzywa
- plot3(Q(:,1), Q(:,2), Q(:,3))
- //Punkty początkowe
- plot3(P0(1), P0(2), P0(3), '.', 'Color', [255, 153, 51] / 255, 'MarkerSize', 30, 'LineWidth', 3);
- plot3(P1(1), P1(2), P1(3), '.', 'Color', [255, 153, 51] / 255, 'MarkerSize', 30, 'LineWidth', 3);
- grid on
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement