close all a=input('Enter a value for how close the spirals will be,usually around .01'); r=input('Enter a value for how many times the spiral navigates around the sphere, standard value is 100 '); s=input('Enter a value to close the top of the sphere, small values create a cylinder, standard value is around 15 '); v=input('Enter a value to close the bottom of the shpere, small values create a cylinder, standard value is around 15 '); q=input('Enter a value for the maximum radius'); t=linspace(0,r*pi,20000); u=linspace(-s*pi,v*pi,20000); c=atan(a*u); x=q.*cos(t).*cos(c); y=q.*sin(t).*cos(c); z=-sin(c); comet3(x,y,z) plot3(x,y,z); xlabel('x-axis') ylabel('y-axis') zlabel('z-axis')