function Fahrrad

% http://geometrie.hs-nb.de/MATLAB-Programme/Fahrrad.m   Bearbeitungsstand: 4.2.2004
% (C) Martin Nitschke, nitschke@hs-nb.de

clc
close('all')
deg=pi/180;
mi=deg/60;
b=560;
h=570;
r=0.8*b;
alpha=20*mi;
beta=alpha+59*deg+40*mi;
c=b/(2*cos(beta))
C=b*[cos(beta);sin(beta)];
B=c*[cos(alpha);sin(alpha)];
A=[0;0];
Polygon([A B C A],'k','linewidth',1.5)
hold('on')
t=[0:360]*deg;
Polygon(repmat(B,size(t))+r*[cos(t);sin(t)],'k')
gamma=beta+72*deg;
v=(C-A)/norm(C-A);
n=[-v(2);v(1)];
v=[cos(gamma);sin(gamma)];
D=A+h*v/(v'*n);
delta=gamma+108*deg-pi;
v=[cos(delta);sin(delta)];
E=[D(1)+(C(2)-D(2))*v(1)/v(2) ;C(2)];
Polygon([A D E C],'k')
F=[A(1)-1.3*(B(1)-A(1)); B(2)];
G=D+8*(D-E);
Polygon([D G],'k')
Polygon(spline([0 1],[250*(D-E)/norm(D-E) G F 250*(F-C)/norm(F-C)],0:0.01:1),'k')
Polygon(repmat(F,size(t))+r*[cos(t);sin(t)],'k')
hold('off')
axis('equal')
axis([F(1)-r B(1)+r B(2)-r C(2)])
axis('off')
print('-deps','Fahrrad')
function Polygon(P,varargin);
plot(P(1,:),P(2,:),varargin{:})
