#! /usr/local/bin/octave -qf

1;      # This trick turns this file into a script file.
	# You can run this file from the command line:
	# $ mkmesh.m

function mesh1()
	t = linspace(0,1.5,21);
	x = cos(t).*t;
	y = sin(t).*t;
	z = t.*t;
	xx = [x;x]; yy = [y;y]; zz = [z-0.1;z+0.1];
	mesh(xx,yy,zz);
end

function mesh2()
	t = linspace(0,2*pi,31);
	u = linspace(0,1.5,21);
	[tt,uu] = meshgrid(t,u);
	xx = uu.*cos(tt);
	yy = uu.*sin(tt);
	zz = uu.*tt;
	mesh(xx,yy,zz);
end

sombrero(32);
pause
mesh1();
pause
mesh2();
pause
