Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *************************************************
- DUAL HELIX
- *************************************************
- syms t;
- t=linspace(0,4*pi,101);
- x = cos(t);
- y = sin(t);
- z = t;
- plot3(x,y,z,'r','LineWidth',2);
- view([1 1 1])
- xlabel('x'); ylabel('y'); zlabel('z');
- hold on;
- x = 2*cos(t);
- y = 2*sin(t);
- z = t;
- plot3(x,y,z,'b','LineWidth',5);
- view([1 1 1]);
- grid on;
- *************************************************
- Rainbow Helixes
- *************************************************
- syms t;
- t=linspace(0,4*pi,2);
- x = cos(t);
- y = sin(t);
- z = t;
- clf;
- plot3(x,y,z,'r','LineWidth',2);
- view([1 1 1])
- xlabel('x'); ylabel('y'); zlabel('z');
- grid on;
- hold on;
- x = 1.2*cos(t);
- y = 1.2*sin(t);
- z = t;
- plot3(x,y,z,'green','LineWidth',3);
- hold on;
- view([1 1 1]);
- grid on;
- x = 1.3*cos(t);
- y = 1.3*sin(t);
- z = t;
- plot3(x,y,z,'yellow','LineWidth',3);
- hold on;
- view([1 1 1]);
- grid on;
- x = 1.4*cos(t);
- y = 1.4*sin(t);
- z = t;
- plot3(x,y,z,'c','LineWidth',4);
- hold on;
- view([1 1 1]);
- grid on;
- x = 1.6*cos(t);
- y = 1.6*sin(t);
- z = t;
- plot3(x,y,z,'m','LineWidth',4);
- hold on;
- view([1 1 1]);
- grid on;
- x = 1.8*cos(t);
- y = 1.8*sin(t);
- z = t;
- plot3(x,y,z,'black','LineWidth',4);
- hold on;
- view([1 1 1]);
- grid on;
- x = 2*cos(t);
- y = 2*sin(t);
- z = t;
- plot3(x,y,z,'b','LineWidth',6);
- hold on;
- view([1 1 1]);
- grid on;
- *************************************************
- Upside Down Parachute
- *************************************************
- syms x y;
- clf;
- x=linspace(-2,2,-5);
- y=linspace(-2,2,-5);
- [x,y]=meshgrid(x,y);
- z=x.^2+y.^2;
- surf(x,y,z);
- view([1 1 1]);
- xlabel('x');
- ylabel('y');
- zlabel('z');
- title('First Octant View of z = x^2 + y^2');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement