function P2Solve()
% Checks out Sideline..
close all
a = 3;
for b = [2.9 2 1]
for w = [.7 .5 .3]
for d = [2.5 2 1]
tau = linspace(0,2*pi);
plot(a*cos(tau),b*sin(tau),'k','linewidth',2)
hold on
plot([-d -d],[-w/2 w/2],'r','linewidth',4)
plot([d d],[-w/2 w/2],'r','linewidth',4)
hold off
axis([-a-1 a+1 -b-1 b+1])
axis equal
hold on
[xStar,yStar,ThetaStar] = Sideline(a,b,d,w);
plot([xStar -d],[yStar w/2],'k')
plot([xStar -d],[yStar -w/2],'k')
plot(xStar,yStar,'.m','Markersize',25)
title(sprintf('ThetaStar = %5.2f xStar = %6.3f yStar = %6.3f',...
-ThetaStar,xStar,yStar),'Fontsize',16)
xlabel(sprintf('a = %5.2f b = %5.2f d = %5.2f w = %5.2f',a,b,d,w))
hold off
grid on
shg
pause(1)
end
end
end