clear all

L1 = 3;
L2 = 3*sqrt(2);
L3 = 3;
gamma = pi/4;

zero1=bisection(@f6,1.4,1.6,eps);
zero2=bisection(@f6,2,2.5,eps);

xy1=f66(zero1);
x11=xy1(1);
y11=xy1(2);

xy2=f66(zero2);
x22=xy2(1);
y22=xy2(2);


u1=[x11+L2*cos(zero1+gamma) x11+L3*cos(zero1)];
v1=[y11+L2*sin(zero1+gamma) y11+L3*sin(zero1)];

u2=[x22+L2*cos(zero2+gamma) x22+L3*cos(zero2)];
v2=[y22+L2*sin(zero2+gamma) y22+L3*sin(zero2)];


figure
plot([x11 u1 x11],[y11 v1 y11],'r'); hold on
plot([0 5 0], [0 0 6], 'bo');
plot([0 x11], [0 y11], 'g', [u1(2) 5], [v1(2) 0], 'g', [0 u1(1)], [6 v1(1)], 'g')
title('figure 1 part 6')

figure
plot([x22 u2 x22],[y22 v2 y22],'r'); hold on
plot([0 5 0], [0 0 6], 'bo');
plot([0 x22], [0 y22], 'g', [u2(2) 5], [v2(2) 0], 'g', [0 u2(1)], [6 v2(1)], 'g')
title('figure 2 part 6')
