Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear, clc, clf;
- t = (0:0.00001:1)';
- b = [1.0 0.72];
- c = [0.12 0.9];
- p1 = [1 0];
- p2 = [0 0.5];
- points = [p1; b; c; p2; p1];
- plot(p1(1),p1(2),'*g',p2(1),p2(2),'*r',b(1),b(2),'*black',c(1),c(2),'*b');
- axis equal, hold on;
- A = [(1-t).^3 3*t.*(1-t).^2 3*t.^2.*(1-t) t.^3];
- r = A*[p1; b; c; p2];
- plot(r(:,1), r(:,2));
- plot(points(:,1), points(:,2), '--black');
- phi = 0:0.001:pi/2;
- x = cos(phi).^3;
- f = 1.5*sin(phi)-sin(phi).^3;
- plot(x,f,'g');
Add Comment
Please, Sign In to add comment