This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % - the figure should be titled 'Whirlpool!' and should show a grid % function whirlpool(h, i) theta = linspace(0, h./2, 2*h*i); % theta goes from 0 to h/2 z = theta; % z goes from 0 to h/2 x = z.*cos(theta.*i); % x is radius(z) times cos of angle times i y = z.*sin(theta.*i); % y is radius(z) times sin of angle times i grid on hold on title('Whirlpool!'); plot3(x,y,z,'k'); % plots top of whirlpool plot3(-x,-y,-z,'k'); % plots bottom of whirlpool view(3); % setting view to default 3D view end...
View Full Document
This note was uploaded on 10/27/2009 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.
- Spring '08
- Computer Science