This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % circle's center. For example, if the radius was 1 and (x,y) was (0,0) the % next circle would have a radius of .95 and the new center of the next % circle would be (.25,.25). (Please refer to tunneltest.jpg for example.) % You *must* use recursion to write this code. REMEMBER to label the title % as 'Tunnel', your xaxis as 'xaxis', and your yaxis as 'yaxis'. function tunnel(r, x, y) th = linspace(0,(2*pi),100) plot(x+r*cos(th),y+r*sin(th)) axis('square') title('Tunnel') xlabel('xaxis') ylabel('yaxis') while r>=0.1 hold on r = 0.95*r x = x + 0.25 y = y + 0.25 plot(x+r*cos(th),y+r*sin(th)) end...
View
Full
Document
This note was uploaded on 07/06/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.
 Fall '08
 Stallworth

Click to edit the document details