function[]=MakeRotatingSphereFigures
	frequency1 = ExactInertialSphereFrequency( 25, 0 );
	frequency2 = ExactInertialSphereFrequency( 45, 136.2242 );
	frequency3 = ExactInertialSphereFrequency( 20, 50 );
	
	duration1 = 3/frequency1;
	duration2 = 1/frequency2;
	duration3 = 5/frequency3;
	
	[time1, phi1, theta1, u1, v1, f1] = ExactInertialSphereSolution( 25, 0, duration1, duration1/200 );
	phi1 = phi1 + 315;
	[time2, phi2, theta2, u2, v2, f2] = ExactInertialSphereSolution( 45, 136.2242 );
	phi2 = phi2 + 275;
	[time3, phi3, theta3, u3, v3, f3] = ExactInertialSphereSolution( 20, 50, duration3, duration3/200 );
	phi3 = phi3+220;
	
	radius = 1.001;
		
	figure('Position',[0 0 1024 1024]);	
	
	% Draw and save example 1
	DrawSphere
	hold on;
		plot3( radius*cosd(phi1).*cosd(theta1), radius*sind(phi1).*cosd(theta1), radius*sind(theta1), 'Color','black','LineWidth',6 )
	hold off;
	axis equal
	view(0,12)
	zoom(1.2)
	export_fig RotatingSphereExample1.tif -r150

	% Draw and save example 2
	DrawSphere
	hold on;
		plot3( radius*cosd(phi2).*cosd(theta2), radius*sind(phi2).*cosd(theta2), radius*sind(theta2), 'Color','black','LineWidth',6 )
	hold off;
	axis equal
	view(0,12)
	zoom(1.2)
	export_fig RotatingSphereExample2.tif -r150

	% Draw and save example 3
	DrawSphere
	hold on;
		plot3( radius*cosd(phi3).*cosd(theta3), radius*sind(phi3).*cosd(theta3), radius*sind(theta3), 'Color','black','LineWidth',6 )
	hold off;
	axis equal
	view(0,12)
	zoom(1.2)
	export_fig RotatingSphereExample3.tif -r150
end

function[]=DrawSphere
	[xx,yy,zz] = sphere(18);
	scale = 1.01;

	cla reset
	axis square off
	
	props.AmbientStrength = 0.8;
	props.DiffuseStrength = 1;
	props.SpecularColorReflectance = .2;
	props.SpecularExponent = 20;
	props.SpecularStrength = 1;
	props.FaceColor= 'interp';
	props.EdgeColor = [.3 .3 .3];
	props.LineWidth = 1.5;
	props.FaceLighting = 'phong';
	surface(xx,yy,zz,props);
	
	colormap(gray(512));

	light('position',[1 -1 -0.1]);
end