Está en la página 1de 127

Problem I.3.

b
2
A
0

x
1

Figure PI.3.1

PI_3_1.nb

H*Problem I .3 .1*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
xP = a Cos@qD
yP = b Sin@qD
"xP^2a^2+yP^2b^2=1"
ParametricPlot@8 Cos@qD, 3 Sin@qD<, 8q, 0, 2 p<D

a Cos@qD
b Sin@qD
xP^2a^2+yP^2b^2=1
3
2
1

-1

-0.5

0.5
-1
-2
-3

Graphics

Problem I.3.2

0.02
0.01

B
D

-0.01
-0.02

0.02 0.04 0.06 0.08 0.1 0.12 0.14

Figure PI.3.2

PI_3_2_I.nb

(*Problem I.3.2 particular case: f

= p/15

*)

Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(* Input data *)
AB=CD=0.04;
AD=BC=0.09;
f = p/15;
Print["particular case: f

= p/15 "];

(* Position of joint A *)
xA = yA = 0;
(* Position of joint D *)
xD = AD ;
yD = 0 ;
(* Position of joint B *)
xB = AB Cos[f] ;
yB = AB Sin[f] ;
Print["xB = ",xB," m "];
Print["yB = ",yB," m "];
(* Position of joint C *)
Print["Equations for C (xC, yC)"];
Print["(xC-xB)^2+(yC-yB)^2-BC^2 = 0,
(1)"];
eqCI =(xc-xB)^2+(yc-yB)^2-BC^2 == 0;
Print[eqCI," (1)"];
Print["(xC-xD)^2+(yC-yD)^2-CD^2 = 0,
(2)"];
eqCII= (xc-xD)^2+(yc-yD)^2-CD^2 == 0;
Print[eqCII," (2)"];
Print["Solution for C (xC, yC)"];
solutionC=Simplify[Solve[{eqCI,eqCII},{xc,yc}]];
(* Two solutions for C *)
xC1 = xc/.solutionC[[1]];
yC1 = yc/.solutionC[[1]];
xC2 = xc/.solutionC[[2]];
yC2 = yc/.solutionC[[2]];
Print["xC1
Print["yC1
Print["xC2
Print["yC2

=
=
=
=

",xC1,"
",yC1,"
",xC2,"
",yC2,"

m"];
m"];
m"];
m"];

Print[" Select the correct position for C "]


Print[" for 0 <= f <= p => yC <= 0 "]
Print[" for p < f <= 2 p => yC >= 0 "]
(* Select the correct position for C *)
If [ 0 <= f <= p,
If [yC1<0,xC=xC1;yC=yC1,xC=xC2;yC=yC2] ,
If [yC1>0,xC=xC1;yC=yC1,xC=xC2;yC=yC2]
] ;
Print["xC = ",xC," m"];
Print["yC = ",yC," m"];
markers=Table[{Point[{0,0}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],

If [yC1<0,xC=xC1;yC=yC1,xC=xC2;yC=yC2] ,
If [yC1>0,xC=xC1;yC=yC1,xC=xC2;yC=yC2]
] ;

PI_3_2_I.nb

Print["xC = ",xC," m"];


Print["yC = ",yC," m"];
markers=Table[{Point[{0,0}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],
Text["C",{xC,yC},{-1,-1}],
Text["D",{xD,yD},{1,0}]}];
graph[increment]=Graphics[{
{RGBColor[1,0,0],Line[{{0,0},{xB,yB}}]},
{RGBColor[0,1,0],Line[{{xB,yB},{xC,yC}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]},
{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];
C2x
C2y

= ( xB + xC ) / 2 ;
= ( yB + yC ) / 2 ;

Print["(a)"];
Print["xM = ( xB + xC ) / 2 = ",C2x," m"];
Print["yM = ( yB + yC ) / 2 = ",C2y," m"];
Mx
My

= ( xB + 0.5 xC ) / (1+0.5) ;
= ( yB + 0.5 yC ) / (1+0.5) ;

Print["(b)"];
Print["xM = ( xB + 0.5 xC ) / (1+0.5) = ",Mx," m"];
Print["yM = ( yB + 0.5 yC ) / (1+0.5) = ",My," m"];

particular case: f

= p15

xB = 0.0391259 m
yB = 0.00831647 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0391259 + xcL2 + H-0.00831647 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.124441 m
yC1 = -0.0203426 m
xC2 = 0.129126 m
yC2 = 0.00831647 m
Select the correct position for C
for

0 <= f <= p

=> yC <= 0

PI_3_2_I.nb

for

p < f <= 2 p

=> yC >= 0

xC = 0.124441 m
yC = -0.0203426 m
HaL

xM = H xB + xC L 2 = 0.0817834 m

yM = H yB + yC L 2 = -0.00601305 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0675643 m

yM = H yB + 0.5 yC L H1+0.5L = -0.00123654 m

PI_3_2_II.nb

(*Problem I.3.2*)
Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(* Input data *)
AB=CD=0.04;
AD=BC=0.09;
(* Position of joint A *)
xA = yA = 0;
(* Position of joint D *)
xD = AD ;
yD = 0 ;
increment = 0 ;
For [ f = 0 , f <= 2 p , f += p/10 ,
Print["f

",f," rad = ", f 180/p," deg"];

(* Position of joint B *)
xB = AB Cos[f] ;
yB = AB Sin[f] ;
Print["xB = ",xB," m "];
Print["yB = ",yB," m "];
(* Position of joint C *)
Print["Equations for C (xC, yC)"];
Print["(xC-xB)^2+(yC-yB)^2-BC^2 = 0,
(1)"];
eqCI =(xc-xB)^2+(yc-yB)^2-BC^2 == 0;
Print[eqCI," (1)"];
Print["(xC-xD)^2+(yC-yD)^2-CD^2 = 0,
(2)"];
eqCII= (xc-xD)^2+(yc-yD)^2-CD^2 == 0;
Print[eqCII," (2)"];
Print["Solution for C (xC, yC)"];
solutionC=Simplify[Solve[{eqCI,eqCII},{xc,yc}]];
(* Two solutions for C *)
xC1 = xc/.solutionC[[1]];
yC1 = yc/.solutionC[[1]];
xC2 = xc/.solutionC[[2]];
yC2 = yc/.solutionC[[2]];
Print["xC1
Print["yC1
Print["xC2
Print["yC2

=
=
=
=

",xC1,"
",yC1,"
",xC2,"
",yC2,"

m"];
m"];
m"];
m"];

(* Select the correct position for C *)


If [ 0 <= f <= p,
If [yC1<0,xC=xC1;yC=yC1,xC=xC2;yC=yC2] ,
If [yC1>0,xC=xC1;yC=yC1,xC=xC2;yC=yC2]
] ;
Print["xC = ",xC," m"];
Print["yC = ",yC," m"];
markers=Table[{Point[{0,0}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],

If [yC1>0,xC=xC1;yC=yC1,xC=xC2;yC=yC2]
] ;

PI_3_2_II.nb
Print["xC = ",xC," m"];

Print["yC = ",yC," m"];


markers=Table[{Point[{0,0}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],
Text["C",{xC,yC},{-1,-1}],
Text["D",{xD,yD},{1,0}]}];
graph[increment]=Graphics[{
{RGBColor[1,0,0],Line[{{0,0},{xB,yB}}]},
{RGBColor[0,1,0],Line[{{xB,yB},{xC,yC}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]},
{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];
Show[Graphics[graph[increment]],
PlotRange{{-.1,.2},{-.05,.05}},
FrameTrue,AxesOrigin{0,0},FrameLabel{"x","y"},
Axes{True,True},AspectRatioAutomatic];
increment++ ;
C2x [ increment ] = ( xB + xC ) / 2 ;
C2y [ increment ] = ( yB + yC ) / 2 ;
Print["(a)"];
Print["xM = ( xB + xC ) / 2 = ",C2x[ increment ]," m"];
Print["yM = ( yB + yC ) / 2 = ",C2y[ increment ]," m"];
Mx [ increment ] = ( xB + 0.5 xC ) / (1+0.5) ;
My [ increment ] = ( yB + 0.5 yC ) / (1+0.5) ;
Print["(b)"];
Print["xM = ( xB + 0.5 xC ) / (1+0.5) = ",Mx[ increment ]," m"];
Print["yM = ( yB + 0.5 yC ) / (1+0.5) = ",My[ increment ]," m"];
Print[" "];
Print[" --------------------------------- "];
Print[" "];

]; (* End of FOR loop *)

0 rad = 0 deg

xB = 0.04 m
yB = 0 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.04 + xcL2 + yc2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L

PI_3_2_II.nb

Solution for C HxC, yCL


xC1 = 0.13 m
yC1 = 0. m
xC2 = 0.13 m
yC2 = 0. m
xC = 0.13 m
yC = 0. m
0.04
0.02
0
y
-0.02
-0.04

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.085 m
yM = H yB + yC L 2 = 0. m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.07 m


yM = H yB + 0.5 yC L H1+0.5L = 0. m

---------------------------------

p
rad = 18 deg
10

xB = 0.0380423 m
yB = 0.0123607 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0380423 + xcL2 + H-0.0123607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.118401 m
yC1 = -0.0281674 m
xC2 = 0.128042 m

PI_3_2_II.nb

yC2 = 0.0123607 m
xC = 0.118401 m
yC = -0.0281674 m
0.04
0.02
0
y
-0.02
-0.04

B
A

D
C

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0782215 m

yM = H yB + yC L 2 = -0.00790335 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0648284 m

yM = H yB + 0.5 yC L H1+0.5L = -0.00114867 m

---------------------------------

p
rad = 36 deg
5

xB = 0.0323607 m
yB = 0.0235114 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0323607 + xcL2 + H-0.0235114 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0966834 m
yC1 = -0.0394377 m
xC2 = 0.122361 m
yC2 = 0.0235114 m
xC = 0.0966834 m
yC = -0.0394377 m

PI_3_2_II.nb

0.04
0.02
0
y
-0.02
-0.04

B
A

D
C

-0.05

0.05
x

HaL

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.064522 m

yM = H yB + yC L 2 = -0.00796315 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0538016 m

yM = H yB + 0.5 yC L H1+0.5L = 0.00252837 m

---------------------------------

3p
rad = 54 deg
10

xB = 0.0235114 m
yB = 0.0323607 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0235114 + xcL2 + H-0.0323607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0790381 m
yC1 = -0.0384686 m
xC2 = 0.113511 m
yC2 = 0.0323607 m
xC = 0.0790381 m
yC = -0.0384686 m
0.04
0.02
0
y
-0.02
-0.04

B
A

D
C

-0.05

0.05
x

0.1

0.15

0.2

PI_3_2_II.nb

HaL

xM = H xB + xC L 2 = 0.0512747 m

yM = H yB + yC L 2 = -0.00305398 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0420203 m

yM = H yB + 0.5 yC L H1+0.5L = 0.00875091 m

---------------------------------

2p
rad = 72 deg
5

xB = 0.0123607 m
yB = 0.0380423 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0123607 + xcL2 + H-0.0380423 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0675118 m
yC1 = -0.0330799 m
xC2 = 0.102361 m
yC2 = 0.0380423 m
xC = 0.0675118 m
yC = -0.0330799 m
B

0.04
0.02
0
y
-0.02
-0.04

-0.05
HaL

D
C

0.05
x

0.1

xM = H xB + xC L 2 = 0.0399362 m

yM = H yB + yC L 2 = 0.00248119 m
HbL

0.15

0.2

PI_3_2_II.nb

xM = H xB + 0.5 xC L H1+0.5L = 0.0307444 m


yM = H yB + 0.5 yC L H1+0.5L = 0.0143349 m

---------------------------------

p
rad = 90 deg
2

xB = 0 m
yB = 0.04 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + xc2 + H-0.04 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0603093 m
yC1 = -0.0268041 m
xC2 = 0.09 m
yC2 = 0.04 m
xC = 0.0603093 m
yC = -0.0268041 m
B

0.04
0.02
0
y
-0.02
-0.04

-0.05
HaL

D
C

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0301546 m

yM = H yB + yC L 2 = 0.00659794 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0201031 m


yM = H yB + 0.5 yC L H1+0.5L = 0.017732 m

---------------------------------

PI_3_2_II.nb

3p
rad = 108 deg
5

xB = -0.0123607 m
yB = 0.0380423 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0123607 + xcL2 + H-0.0380423 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0557944 m
yC1 = -0.020736 m
xC2 = 0.0776393 m
yC2 = 0.0380423 m
xC = 0.0557944 m
yC = -0.020736 m
B

0.04
0.02
0
y
-0.02
-0.04

-0.05

HaL

C
0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0217169 m

yM = H yB + yC L 2 = 0.00865315 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0103577 m


yM = H yB + 0.5 yC L H1+0.5L = 0.0184495 m

---------------------------------

7p
rad = 126 deg
10

xB = -0.0235114 m
yB = 0.0323607 m

PI_3_2_II.nb

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0235114 + xcL2 + H-0.0323607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0529588 m
yC1 = -0.0150979 m
xC2 = 0.0664886 m
yC2 = 0.0323607 m
xC = 0.0529588 m
yC = -0.0150979 m
0.04
0.02
0
y
-0.02
-0.04

B
A

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0147237 m
yM = H yB + yC L 2 = 0.0086314 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.00197864 m


yM = H yB + 0.5 yC L H1+0.5L = 0.0165412 m

---------------------------------

4p
rad = 144 deg
5

xB = -0.0323607 m
yB = 0.0235114 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0323607 + xcL2 + H-0.0235114 + ycL2 == 0 H1L

PI_3_2_II.nb

10

-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0512302 m
yC1 = -0.0098438 m
xC2 = 0.0576393 m
yC2 = 0.0235114 m
xC = 0.0512302 m
yC = -0.0098438 m
0.04
0.02
0
y
-0.02
-0.04

B
A

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.00943475 m
yM = H yB + yC L 2 = 0.00683381 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = -0.00449706 m


yM = H yB + 0.5 yC L H1+0.5L = 0.012393 m

---------------------------------

9p
rad = 162 deg
10

xB = -0.0380423 m
yB = 0.0123607 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0380423 + xcL2 + H-0.0123607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0502958 m
yC1 = -0.00485535 m

PI_3_2_II.nb

11

xC2 = 0.0519577 m
yC2 = 0.0123607 m
xC = 0.0502958 m
yC = -0.00485535 m
0.04
0.02
0
y
-0.02
-0.04

B
A

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.00612676 m
yM = H yB + yC L 2 = 0.00375267 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = -0.00859625 m


yM = H yB + 0.5 yC L H1+0.5L = 0.006622 m

---------------------------------

p rad = 180 deg

xB = -0.04 m
yB = 0 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.04 + xcL2 + yc2 == 0 H1L

-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.05 m
yC1 = 0. m
xC2 = 0.05 m
yC2 = 0. m
xC = 0.05 m
yC = 0. m

PI_3_2_II.nb

12

0.04
0.02
0
y
-0.02
-0.04

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.005 m
yM = H yB + yC L 2 = 0. m
HbL

xM = H xB + 0.5 xC L H1+0.5L = -0.01 m


yM = H yB + 0.5 yC L H1+0.5L = 0. m

---------------------------------

11 p
rad = 198 deg
10

xB = -0.0380423 m
yB = -0.0123607 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0380423 + xcL2 + H0.0123607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0519577 m
yC1 = -0.0123607 m
xC2 = 0.0502958 m
yC2 = 0.00485535 m
xC = 0.0502958 m
yC = 0.00485535 m
0.04
0.02
0
y
-0.02
-0.04

-0.05

0.05
x

0.1

0.15

0.2

PI_3_2_II.nb

13

HaL

xM = H xB + xC L 2 = 0.00612676 m

yM = H yB + yC L 2 = -0.00375267 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = -0.00859625 m


yM = H yB + 0.5 yC L H1+0.5L = -0.006622 m

---------------------------------

6p
rad = 216 deg
5

xB = -0.0323607 m
yB = -0.0235114 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0323607 + xcL2 + H0.0235114 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0576393 m
yC1 = -0.0235114 m
xC2 = 0.0512302 m
yC2 = 0.0098438 m
xC = 0.0512302 m
yC = 0.0098438 m
0.04
0.02
0
y
-0.02
-0.04

C
A

-0.05
HaL

B
0

0.05
x

0.1

xM = H xB + xC L 2 = 0.00943475 m

yM = H yB + yC L 2 = -0.00683381 m
HbL

0.15

0.2

PI_3_2_II.nb

14

xM = H xB + 0.5 xC L H1+0.5L = -0.00449706 m


yM = H yB + 0.5 yC L H1+0.5L = -0.012393 m

---------------------------------

13 p
rad = 234 deg
10

xB = -0.0235114 m
yB = -0.0323607 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0235114 + xcL2 + H0.0323607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0664886 m
yC1 = -0.0323607 m
xC2 = 0.0529588 m
yC2 = 0.0150979 m
xC = 0.0529588 m
yC = 0.0150979 m
0.04
0.02
0
y
-0.02
-0.04

C
A

-0.05
HaL

B
0

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0147237 m

yM = H yB + yC L 2 = -0.0086314 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.00197864 m

yM = H yB + 0.5 yC L H1+0.5L = -0.0165412 m

---------------------------------

PI_3_2_II.nb

15

7p
rad = 252 deg
5

xB = -0.0123607 m
yB = -0.0380423 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H0.0123607 + xcL2 + H0.0380423 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0776393 m
yC1 = -0.0380423 m
xC2 = 0.0557944 m
yC2 = 0.020736 m
xC = 0.0557944 m
yC = 0.020736 m
0.04
0.02
0
y
-0.02
-0.04

C
A

B
-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0217169 m

yM = H yB + yC L 2 = -0.00865315 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0103577 m

yM = H yB + 0.5 yC L H1+0.5L = -0.0184495 m

---------------------------------

3p
rad = 270 deg
2

xB = 0 m
yB = -0.04 m

PI_3_2_II.nb

16

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + xc2 + H0.04 + ycL2 == 0 H1L

-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0603093 m
yC1 = 0.0268041 m
xC2 = 0.09 m
yC2 = -0.04 m
xC = 0.0603093 m
yC = 0.0268041 m
0.04
0.02
0
y
-0.02
-0.04

C
A

D
B

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0301546 m

yM = H yB + yC L 2 = -0.00659794 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0201031 m

yM = H yB + 0.5 yC L H1+0.5L = -0.017732 m

---------------------------------

8p
rad = 288 deg
5

xB = 0.0123607 m
yB = -0.0380423 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0123607 + xcL2 + H0.0380423 + ycL2 == 0 H1L

PI_3_2_II.nb

17

-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.102361 m
yC1 = -0.0380423 m
xC2 = 0.0675118 m
yC2 = 0.0330799 m
xC = 0.0675118 m
yC = 0.0330799 m
C

0.04
0.02
0
y
-0.02
-0.04

D
B

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0399362 m

yM = H yB + yC L 2 = -0.00248119 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0307444 m

yM = H yB + 0.5 yC L H1+0.5L = -0.0143349 m

---------------------------------

17 p
rad = 306 deg
10

xB = 0.0235114 m
yB = -0.0323607 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0235114 + xcL2 + H0.0323607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.113511 m
yC1 = -0.0323607 m

PI_3_2_II.nb

18

xC2 = 0.0790381 m
yC2 = 0.0384686 m
xC = 0.0790381 m
yC = 0.0384686 m
C

0.04
0.02
0
y
-0.02
-0.04

D
B

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.0512747 m

yM = H yB + yC L 2 = 0.00305398 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0420203 m

yM = H yB + 0.5 yC L H1+0.5L = -0.00875091 m

---------------------------------

9p
rad = 324 deg
5

xB = 0.0323607 m
yB = -0.0235114 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0323607 + xcL2 + H0.0235114 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.122361 m
yC1 = -0.0235114 m
xC2 = 0.0966834 m
yC2 = 0.0394377 m
xC = 0.0966834 m
yC = 0.0394377 m

PI_3_2_II.nb

19

0.04
0.02
0
y
-0.02
-0.04

D
B

-0.05

HaL

0.05
x

0.1

0.15

0.2

xM = H xB + xC L 2 = 0.064522 m

yM = H yB + yC L 2 = 0.00796315 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0538016 m

yM = H yB + 0.5 yC L H1+0.5L = -0.00252837 m

---------------------------------

19 p
rad = 342 deg
10

xB = 0.0380423 m
yB = -0.0123607 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.0380423 + xcL2 + H0.0123607 + ycL2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.128042 m
yC1 = -0.0123607 m
xC2 = 0.118401 m
yC2 = 0.0281674 m
xC = 0.118401 m
yC = 0.0281674 m
0.04
0.02
0
y
-0.02
-0.04

C
A

-0.05

0.05
x

0.1

0.15

0.2

PI_3_2_II.nb

20

HaL

xM = H xB + xC L 2 = 0.0782215 m

yM = H yB + yC L 2 = 0.00790335 m
HbL

xM = H xB + 0.5 xC L H1+0.5L = 0.0648284 m

yM = H yB + 0.5 yC L H1+0.5L = 0.00114867 m

---------------------------------

2 p rad = 360 deg

xB = 0.04 m
yB = 0 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0081 + H-0.04 + xcL2 + yc2 == 0 H1L


-0.0016 + H-0.09 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.13 m
yC1 = 0. m
xC2 = 0.13 m
yC2 = 0. m
xC = 0.13 m
yC = 0. m
0.04
0.02
0
y
-0.02
-0.04

-0.05
HaL

0.05
x

xM = H xB + xC L 2 = 0.085 m
yM = H yB + yC L 2 = 0. m
HbL

0.1

0.15

0.2

PI_3_2_II.nb

21

xM = H xB + 0.5 xC L H1+0.5L = 0.07 m


yM = H yB + 0.5 yC L H1+0.5L = 0. m

---------------------------------

H*All the positions on the same graphic*LShow@Table@graph@iD, 8i, increment - 1<D,


PlotRange 88-.06, .15<, 8-.05, .05<<, Frame True, AxesOrigin 8xA, yA<,
FrameLabel 8"x", "y"<, Axes 8True, True<, AspectRatio AutomaticD;
0.04
0.02
0

B B B

B
B
B

-0.02

A
B
B

B B B

-0.04
-0.05

C
B
C
B CC
C
B C
C
B CC
C
B
C

C
C
C

D
C

C
C

0.05
x

C
0.1

ListPlot@Table@8C2x@iD, C2y@iD<, 8i, 1, increment<D,


PlotRange 88-.06, .15<, 8-.05, .05<<, PlotJoined True, Frame True,
Axes 8True, True<, AxesLabel 8"xC2", "yC2"<, AspectRatio AutomaticD;
yC2
0.04
0.02
0

xC2

-0.02
-0.04
-0.05

0.05

0.1

ListPlot@Table@8Mx@iD, My@iD<, 8i, 1, increment<D,


PlotRange 88-.06, .15<, 8-.05, .05<<, PlotJoined True, Frame True,
Axes 8True, True<, AxesLabel 8"xM", "yM"<, AspectRatio AutomaticD;
yM
0.04
0.02
0

xM

-0.02
-0.04
-0.05

0.05

0.1

PI_3_3_I.nb

(*Problem I.3.3 particular case: f

= -p/3

*)

Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(* Input data *)
AB=0.03;
BC=0.065;
CD=0.05;
BM=0.09;
CM=0.12;
"For simplicity select:"
"AD=BC "
"A and D on the same horizontal axis"
AD=BC;
f = -p/3;
Print["particular case: f

= -p/3 "];

(* Position of joint A *)
xA = yA = 0;
(* Position of joint D *)
xD = AD ;
yD = 0 ;
(* Position of joint B *)
xB = AB Cos[f] ;
yB = AB Sin[f] ;
Print["xB = ",xB," m "];
Print["yB = ",yB," m "];
(* Position of joint C *)
Print["Equations for C (xC, yC)"];
Print["(xC-xB)^2+(yC-yB)^2-BC^2 = 0,
(1)"];
eqCI =(xc-xB)^2+(yc-yB)^2-BC^2 == 0;
Print[eqCI," (1)"];
Print["(xC-xD)^2+(yC-yD)^2-CD^2 = 0,
(2)"];
eqCII= (xc-xD)^2+(yc-yD)^2-CD^2 == 0;
Print[eqCII," (2)"];
Print["Solution for C (xC, yC)"];
solutionC=Simplify[Solve[{eqCI,eqCII},{xc,yc}]];
(* Two solutions for C *)
xC1 = xc/.solutionC[[1]];
yC1 = yc/.solutionC[[1]];
xC2 = xc/.solutionC[[2]];
yC2 = yc/.solutionC[[2]];
Print["xC1
Print["yC1
Print["xC2
Print["yC2

=
=
=
=

",xC1,"
",yC1,"
",xC2,"
",yC2,"

m"];
m"];
m"];
m"];

Print[" Select the correct position for C "]


Print[" constrain: Sign[yB] Sign[yC] "]
(* Select the correct position for C *)
If [ Sign[yB]Sign[yC1],
xC=xC1;yC=yC1,xC=xC2;yC=yC2 ];
Print["xC = ",xC," m"];
Print["yC = ",yC," m"];
(* Position of joint M *)

Print[" Select the correct position for C "]


Print[" constrain: Sign[yB] Sign[yC] "]

PI_3_3_I.nb

(* Select the correct position for C *)


If [ Sign[yB]Sign[yC1],
xC=xC1;yC=yC1,xC=xC2;yC=yC2 ];
Print["xC = ",xC," m"];
Print["yC = ",yC," m"];
(* Position of joint M *)
Print["Equations for M (xM, yM)"];
Print["(xM-xB)^2+(yM-yB)^2-BM^2 = 0,
(3)"];
eqMI =(xm-xB)^2+(ym-yB)^2-BM^2 == 0;
Print[eqMI," (3)"];
Print["(xm-xC)^2+(ym-yC)^2-CM^2 = 0,
(4)"];
eqMII= (xm-xC)^2+(ym-yC)^2-CM^2 == 0;
Print[eqMII," (4)"];
Print["Solution for M (xM, yM)"];
solutionM=Simplify[Solve[{eqMI,eqMII},{xm,ym}]];
(* Two solutions for M *)
xM1 = xc/.solutionC[[1]];
yM1 = yc/.solutionC[[1]];
xM2 = xc/.solutionC[[2]];
yM2 = yc/.solutionC[[2]];
Print["xM1
Print["yM1
Print["xM2
Print["yM2

=
=
=
=

",xM1,"
",yM1,"
",xM2,"
",yM2,"

m"];
m"];
m"];
m"];

Print[" Select the correct position for M "]


Print[" constrain: yM > yB "]
If [yM1>yB,xM=xM1;yM=yM1,xM=xM2;yM=yM2];
Print["xM = ",xM," m"];
Print["yM = ",yM," m"];
markers=Table[{Point[{0,0}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{xM,yM}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],
Text["C",{xC,yC},{1,0}],
Text["M",{xM,yM},{1,0}],
Text["D",{xD,yD},{1,0}]}];
graph=Graphics[{
{RGBColor[1,0,0],Line[{{0,0},{xB,yB}}]},
{RGBColor[0,0,1],Line[{{xB,yB},{xC,yC}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]},
{RGBColor[0,0,1],Line[{{xB,yB},{xM,yM}}]},
{RGBColor[0,0,1],Line[{{xC,yC},{xM,yM}}]},
{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];
Show[Graphics[graph],
PlotRange{All,All},
FrameTrue,AxesOrigin{0,0},FrameLabel{"x","y"},
Axes{True,True},AspectRatioAutomatic];

{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];
Show[Graphics[graph],

PI_3_3_I.nb
PlotRange{All,All},

FrameTrue,AxesOrigin{0,0},FrameLabel{"x","y"},
Axes{True,True},AspectRatioAutomatic];

For simplicity select:


AD=BC
A and D on the same horizontal axis
particular case: f

= -p3

xB = 0.015 m
yB = -0.0259808 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.015 + xcL2 + H0.0259808 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0758605 m
yC1 = -0.0488063 m
xC2 = 0.0313049 m
yC2 = 0.036941 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0758605 m
yC = -0.0488063 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.015 + xmL2 + H0.0259808 + ymL2 == 0 H3L


-0.0144 + H-0.0758605 + xmL2 + H0.0488063 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = 0.0758605 m
yM1 = -0.0488063 m
xM2 = 0.0313049 m
yM2 = 0.036941 m

PI_3_3_I.nb

Select the correct position for M


constrain: yM > yB
xM = 0.0313049 m
yM = 0.036941 m
M
0.02

y
-0.02

-0.04
C
-0.04 -0.02

0.02
x

0.04

0.06

PI_3_3_II.nb

(*Problem I.3.3*)
Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(* Input data *)
AB=0.03;
BC=0.065;
CD=0.05;
BM=0.09;
CM=0.12;
"For simplicity select: AD=BC and "
"A and D on the same horizontal axis"
AD=BC;
(* Position of joint A *)
xA = yA = 0;
(* Position of joint D *)
xD = AD ;
yD = 0 ;
increment = 0 ;
For [ f = 0 , f <= 2 p , f += p/10 ,
Print["f

",f," rad = ", f 180/p," deg"];

(* Position of joint B *)
xB = AB Cos[f] ;
yB = AB Sin[f] ;
Print["xB = ",xB," m "];
Print["yB = ",yB," m "];
(* Position of joint C *)
Print["Equations for C (xC, yC)"];
Print["(xC-xB)^2+(yC-yB)^2-BC^2 = 0,
(1)"];
eqCI =(xc-xB)^2+(yc-yB)^2-BC^2 == 0;
Print[eqCI," (1)"];
Print["(xC-xD)^2+(yC-yD)^2-CD^2 = 0,
(2)"];
eqCII= (xc-xD)^2+(yc-yD)^2-CD^2 == 0;
Print[eqCII," (2)"];
Print["Solution for C (xC, yC)"];
solutionC=Simplify[Solve[{eqCI,eqCII},{xc,yc}]];
(* Two solutions for C *)
xC1 = xc/.solutionC[[1]];
yC1 = yc/.solutionC[[1]];
xC2 = xc/.solutionC[[2]];
yC2 = yc/.solutionC[[2]];
Print["xC1
Print["yC1
Print["xC2
Print["yC2

=
=
=
=

",xC1,"
",yC1,"
",xC2,"
",yC2,"

m"];
m"];
m"];
m"];

Print[" Select the correct position for C "];


Print[" constrain: Sign[yB] Sign[yC] "];
(* Select the correct position for C *)
If [ Sign[yB]Sign[yC1],
xC=xC1;yC=yC1,xC=xC2;yC=yC2 ];
Print["xC = ",xC," m"];
Print["yC = ",yC," m"];
(* Position of joint M *)

Print[" Select the correct position for C "];


Print[" constrain: Sign[yB] Sign[yC] "];

PI_3_3_II.nb

(* Select the correct position for C *)


If [ Sign[yB]Sign[yC1],
xC=xC1;yC=yC1,xC=xC2;yC=yC2 ];
Print["xC = ",xC," m"];
Print["yC = ",yC," m"];
(* Position of joint M *)
Print["Equations for M (xM, yM)"];
Print["(xM-xB)^2+(yM-yB)^2-BM^2 = 0,
(3)"];
eqMI =(xm-xB)^2+(ym-yB)^2-BM^2 == 0;
Print[eqMI," (3)"];
Print["(xm-xC)^2+(ym-yC)^2-CM^2 = 0,
(4)"];
eqMII= (xm-xC)^2+(ym-yC)^2-CM^2 == 0;
Print[eqMII," (4)"];
Print["Solution for M (xM, yM)"];
solutionM=Simplify[Solve[{eqMI,eqMII},{xm,ym}]];
(* Two solutions for M *)
xM1 = xm/.solutionM[[1]];
yM1 = ym/.solutionM[[1]];
xM2 = xm/.solutionM[[2]];
yM2 = ym/.solutionM[[2]];
Print["xM1
Print["yM1
Print["xM2
Print["yM2

=
=
=
=

",xM1,"
",yM1,"
",xM2,"
",yM2,"

m"];
m"];
m"];
m"];

Print[" Select the correct position for M "];


Print[" constrain: yM > yB "];
If [yM1>yB,xM=xM1;yM=yM1,xM=xM2;yM=yM2];
Print["xM = ",xM," m"];
Print["yM = ",yM," m"];
markers=Table[{Point[{0,0}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{xM,yM}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],
Text["C",{xC,yC},{1,0}],
Text["M",{xM,yM},{1,0}],
Text["D",{xD,yD},{1,0}]}];
graph[increment]=Graphics[{
{RGBColor[1,0,0],Line[{{0,0},{xB,yB}}]},
{RGBColor[0,0,1],Line[{{xB,yB},{xC,yC}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]},
{RGBColor[0,0,1],Line[{{xB,yB},{xM,yM}}]},
{RGBColor[0,0,1],Line[{{xC,yC},{xM,yM}}]},
{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];
Show[Graphics[graph[increment]],
PlotRange{All,All},
FrameTrue,AxesOrigin{0,0},FrameLabel{"x","y"},
Axes{True,True},AspectRatioAutomatic];
increment++ ;
Mx [ increment ] = xM ;
My [ increment ] = yM ;
Print[" "];

{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];

PI_3_3_II.nb
Show[Graphics[graph[increment]],
PlotRange{All,All},
FrameTrue,AxesOrigin{0,0},FrameLabel{"x","y"},
Axes{True,True},AspectRatioAutomatic];
increment++ ;
Mx [ increment ] = xM ;
My [ increment ] = yM ;
Print[" "];
Print[" --------------------------------- "];
Print[" "];
]; (* End of FOR loop *)

For simplicity select: AD=BC and


A and D on the same horizontal axis
f

0 rad = 0 deg

xB = 0.03 m
yB = 0 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.03 + xcL2 + yc2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0721429 m
yC1 = -0.0494872 m
xC2 = 0.0721429 m
yC2 = 0.0494872 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0721429 m
yC = 0.0494872 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.03 + xmL2 + ym2 == 0 H3L

-0.0144 + H-0.0721429 + xmL2 + H-0.0494872 + ymL2 == 0 H4L

PI_3_3_II.nb

Solution for M HxM, yML


xM1 = 0.0870858 m
yM1 = -0.0695788 m
xM2 = -0.0477832 m
yM2 = 0.0452745 m
Select the correct position for M
constrain: yM > yB
xM = -0.0477832 m
yM = 0.0452745 m
0.05
0.04

0.03
y
0.02
0.01
0

-0.04 -0.02

B
D
0.02 0.04 0.06

A
0
x

---------------------------------

p
rad = 18 deg
10

xB = 0.0285317 m
yB = 0.00927051 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.0285317 + xcL2 + H-0.00927051 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.056704 m
yC1 = -0.049307 m
xC2 = 0.0812579 m
yC2 = 0.047283 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD

PI_3_3_II.nb

xC = 0.0812579 m
yC = 0.047283 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.0285317 + xmL2 + H-0.00927051 + ymL2 == 0 H3L


-0.0144 + H-0.0812579 + xmL2 + H-0.047283 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0362142 m
yM1 = 0.0717843 m
xM2 = 0.0673825 m
yM2 = -0.0719121 m
Select the correct position for M
constrain: yM > yB
xM = -0.0362142 m
yM = 0.0717843 m
0.07

0.06
0.05

0.04
y
0.03
0.02
B

0.01
0
-0.04 -0.02

A
0

0.02
x

0.04

D
0.06

0.08

---------------------------------

p
rad = 36 deg
5

xB = 0.0242705 m
yB = 0.0176336 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.0242705 + xcL2 + H-0.0176336 + ycL2 == 0 H1L

PI_3_3_II.nb

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0426338 m
yC1 = -0.0447186 m
xC2 = 0.0823039 m
yC2 = 0.0469103 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0823039 m
yC = 0.0469103 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.0242705 + xmL2 + H-0.0176336 + ymL2 == 0 H3L


-0.0144 + H-0.0823039 + xmL2 + H-0.0469103 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0298747 m
yM1 = 0.0895244 m
xM2 = 0.0499141 m
yM2 = -0.0686358 m
Select the correct position for M
constrain: yM > yB
xM = -0.0298747 m
yM = 0.0895244 m
M
0.08

0.06
C

y
0.04
B

0.02

0
-0.04 -0.02

A
0

0.02
x

0.04

D
0.06

0.08

PI_3_3_II.nb

---------------------------------

3p
rad = 54 deg
10

xB = 0.0176336 m
yB = 0.0242705 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.0176336 + xcL2 + H-0.0242705 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0334375 m
yC1 = -0.038779 m
xC2 = 0.078041 m
yC2 = 0.0482694 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.078041 m
yC = 0.0482694 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.0176336 + xmL2 + H-0.0242705 + ymL2 == 0 H3L


-0.0144 + H-0.078041 + xmL2 + H-0.0482694 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0299027 m
yM1 = 0.100692 m
xM2 = 0.0355022 m
yM2 = -0.0639378 m
Select the correct position for M
constrain: yM > yB

PI_3_3_II.nb

xM = -0.0299027 m
yM = 0.100692 m
0.1

0.08

0.06
y

0.04
B
0.02

0
-0.04 -0.02

A
0

0.02
x

0.04

D
0.06

0.08

---------------------------------

2p
rad = 72 deg
5

xB = 0.00927051 m
yB = 0.0285317 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.00927051 + xcL2 + H-0.0285317 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0280579 m
yC1 = -0.033694 m
xC2 = 0.0707374 m
yC2 = 0.0496697 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0707374 m
yC = 0.0496697 m

Equations for M HxM, yML

PI_3_3_II.nb

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.00927051 + xmL2 + H-0.0285317 + ymL2 == 0 H3L


-0.0144 + H-0.0707374 + xmL2 + H-0.0496697 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0346275 m
yM1 = 0.1071 m
xM2 = 0.0229806 m
yM2 = -0.0604179 m
Select the correct position for M
constrain: yM > yB
xM = -0.0346275 m
yM = 0.1071 m
M
0.1

0.08

0.06
y

0.04
B
0.02

0
-0.04 -0.02

A
0

0.02

0.04

---------------------------------

p
rad = 90 deg
2

xB = 0 m
yB = 0.03 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

-0.004225 + xc2 + H-0.03 + ycL2 == 0 H1L

D
0.06

PI_3_3_II.nb
HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

10
H2L

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.025 m
yC1 = -0.03 m
xC2 = 0.061878 m
yC2 = 0.0499024 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.061878 m
yC = 0.0499024 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + xm2 + H-0.03 + ymL2 == 0 H3L

-0.0144 + H-0.061878 + xmL2 + H-0.0499024 + ymL2 == 0 H4L


Solution for M HxM, yML
xM1 = -0.0423153 m
yM1 = 0.109432 m
xM2 = 0.0119255 m
yM2 = -0.0592064 m
Select the correct position for M
constrain: yM > yB
xM = -0.0423153 m
yM = 0.109432 m

PI_3_3_II.nb

11

M
0.1

0.08

0.06
y

0.04
B
0.02

0
-0.04

-0.02

A
0

0.02

0.04

D
0.06

---------------------------------

3p
rad = 108 deg
5

xB = -0.00927051 m
yB = 0.0285317 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H0.00927051 + xcL2 + H-0.0285317 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0233627 m
yC1 = -0.0276828 m
xC2 = 0.0526058 m
yC2 = 0.0484395 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0526058 m
yC = 0.0484395 m

Equations for M HxM, yML

PI_3_3_II.nb

12

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.00927051 + xmL2 + H-0.0285317 + ymL2 == 0 H3L


-0.0144 + H-0.0526058 + xmL2 + H-0.0484395 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0515927 m
yM1 = 0.10796 m
xM2 = 0.00266269 m
yM2 = -0.0606737 m
Select the correct position for M
constrain: yM > yB
xM = -0.0515927 m
yM = 0.10796 m
M
0.1

0.08

0.06
y
C
0.04
B
0.02

0
-0.04

-0.02

A
0

0.02
x

---------------------------------

7p
rad = 126 deg
10

xB = -0.0176336 m
yB = 0.0242705 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

0.04

D
0.06

PI_3_3_II.nb

13

-0.004225 + H0.0176336 + xcL2 + H-0.0242705 + ycL2 == 0 H1L


HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0227181 m
yC1 = -0.0266878 m
xC2 = 0.0438658 m
yC2 = 0.0453139 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0438658 m
yC = 0.0453139 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.0176336 + xmL2 + H-0.0242705 + ymL2 == 0 H3L


-0.0144 + H-0.0438658 + xmL2 + H-0.0453139 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0614106 m
yM1 = 0.102906 m
xM2 = -0.0040604 m
yM2 = -0.0647001 m
Select the correct position for M
constrain: yM > yB
xM = -0.0614106 m
yM = 0.102906 m

PI_3_3_II.nb

14

0.1 M

0.08

0.06
y
C

0.04
B
0.02

0
-0.06 -0.04 -0.02

A
0
x

0.02

0.04

D
0.06

---------------------------------

4p
rad = 144 deg
5

xB = -0.0242705 m
yB = 0.0176336 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H0.0242705 + xcL2 + H-0.0176336 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0229433 m
yC1 = -0.0270414 m
xC2 = 0.0363838 m
yC2 = 0.0410014 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0363838 m
yC = 0.0410014 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

PI_3_3_II.nb

15

-0.0081 + H0.0242705 + xmL2 + H-0.0176336 + ymL2 == 0 H3L


Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0144 + H-0.0363838 + xmL2 + H-0.0410014 + ymL2 == 0 H4L


Solution for M HxM, yML
xM1 = -0.0710074 m
yM1 = 0.0945469 m
xM2 = -0.00732237 m
yM2 = -0.0707563 m
Select the correct position for M
constrain: yM > yB
xM = -0.0710074 m
yM = 0.0945469 m
M
0.08
0.06
y
0.04

C
B

0.02
0

-0.06 -0.04 -0.02

A
0
x

0.02

0.04

D
0.06

---------------------------------

9p
rad = 162 deg
10

xB = -0.0285317 m
yB = 0.00927051 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H0.0285317 + xcL2 + H-0.00927051 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL

PI_3_3_II.nb

16

xC1 = 0.0241399 m
yC1 = -0.0288176 m
xC2 = 0.0305919 m
yC2 = 0.0362779 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0305919 m
yC = 0.0362779 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.0285317 + xmL2 + H-0.00927051 + ymL2 == 0 H3L


-0.0144 + H-0.0305919 + xmL2 + H-0.0362779 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0798522 m
yM1 = 0.0832043 m
xM2 = -0.0062482 m
yM2 = -0.0779272 m
Select the correct position for M
constrain: yM > yB
xM = -0.0798522 m
yM = 0.0832043 m
0.08 M
0.06
y0.04

0.02
B
0
A
-0.08 -0.06 -0.04 -0.02 0
x

D
0.02 0.04 0.06

---------------------------------

PI_3_3_II.nb

17

p rad = 180 deg

xB = -0.03 m
yB = 0 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H0.03 + xcL2 + yc2 == 0 H1L

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0265789 m
yC1 = -0.0319972 m
xC2 = 0.0265789 m
yC2 = 0.0319972 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0265789 m
yC = 0.0319972 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.03 + xmL2 + ym2 == 0 H3L

-0.0144 + H-0.0265789 + xmL2 + H-0.0319972 + ymL2 == 0 H4L


Solution for M HxM, yML
xM1 = -0.000292105 m
yM1 = -0.0849555 m
xM2 = -0.0874952 m
yM2 = 0.0692409 m
Select the correct position for M
constrain: yM > yB
xM = -0.0874952 m
yM = 0.0692409 m

PI_3_3_II.nb

18

0.07M
0.06
0.05
0.04
y
0.03
0.02
0.01
0

B
-0.075 -0.05 -0.025
x

A
0

0.025 0.05

---------------------------------

11 p
rad = 198 deg
10

xB = -0.0285317 m
yB = -0.00927051 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H0.0285317 + xcL2 + H0.00927051 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0305919 m
yC1 = -0.0362779 m
xC2 = 0.0241399 m
yC2 = 0.0288176 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0305919 m
yC = -0.0362779 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.0285317 + xmL2 + H0.00927051 + ymL2 == 0 H3L


-0.0144 + H-0.0305919 + xmL2 + H0.0362779 + ymL2 == 0 H4L
Solution for M HxM, yML

PI_3_3_II.nb

19

xM1 = -0.0798522 m
yM1 = -0.0832043 m
xM2 = -0.0062482 m
yM2 = 0.0779272 m
Select the correct position for M
constrain: yM > yB
xM = -0.0062482 m
yM = 0.0779272 m
0.08

0.06

0.04

y 0.02

B
-0.02
C
-0.04 -0.02

0.02

0.04

0.06

---------------------------------

6p
rad = 216 deg
5

xB = -0.0242705 m
yB = -0.0176336 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H0.0242705 + xcL2 + H0.0176336 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL

PI_3_3_II.nb

20

xC1 = 0.0363838 m
yC1 = -0.0410014 m
xC2 = 0.0229433 m
yC2 = 0.0270414 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0363838 m
yC = -0.0410014 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.0242705 + xmL2 + H0.0176336 + ymL2 == 0 H3L


-0.0144 + H-0.0363838 + xmL2 + H0.0410014 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0710074 m
yM1 = -0.0945469 m
xM2 = -0.00732237 m
yM2 = 0.0707563 m
Select the correct position for M
constrain: yM > yB
xM = -0.00732237 m
yM = 0.0707563 m

PI_3_3_II.nb

21

M
0.06

0.04

0.02
y
0

B
-0.02

-0.04
-0.04 -0.02

0.02

C
0.04

0.06

---------------------------------

13 p
rad = 234 deg
10

xB = -0.0176336 m
yB = -0.0242705 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H0.0176336 + xcL2 + H0.0242705 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0438658 m
yC1 = -0.0453139 m
xC2 = 0.0227181 m
yC2 = 0.0266878 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0438658 m
yC = -0.0453139 m

Equations for M HxM, yML

PI_3_3_II.nb

22

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.0176336 + xmL2 + H0.0242705 + ymL2 == 0 H3L


-0.0144 + H-0.0438658 + xmL2 + H0.0453139 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0614106 m
yM1 = -0.102906 m
xM2 = -0.0040604 m
yM2 = 0.0647001 m
Select the correct position for M
constrain: yM > yB
xM = -0.0040604 m
yM = 0.0647001 m
M

0.06

0.04

0.02
y
0

-0.02

-0.04
-0.04 -0.02

0.02
x

---------------------------------

7p
rad = 252 deg
5

xB = -0.00927051 m
yB = -0.0285317 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

C
0.04

0.06

PI_3_3_II.nb

23

-0.004225 + H0.00927051 + xcL2 + H0.0285317 + ycL2 == 0 H1L


HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0526058 m
yC1 = -0.0484395 m
xC2 = 0.0233627 m
yC2 = 0.0276828 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0526058 m
yC = -0.0484395 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H0.00927051 + xmL2 + H0.0285317 + ymL2 == 0 H3L


-0.0144 + H-0.0526058 + xmL2 + H0.0484395 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0515927 m
yM1 = -0.10796 m
xM2 = 0.00266269 m
yM2 = 0.0606737 m
Select the correct position for M
constrain: yM > yB
xM = 0.00266269 m
yM = 0.0606737 m

PI_3_3_II.nb

24

0.06

0.04

0.02
y
0

-0.02
B
-0.04
C
-0.04 -0.02

0.02
x

---------------------------------

3p
rad = 270 deg
2

xB = 0 m
yB = -0.03 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + xc2 + H0.03 + ycL2 == 0 H1L

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.025 m
yC1 = 0.03 m
xC2 = 0.061878 m
yC2 = -0.0499024 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.061878 m
yC = -0.0499024 m

Equations for M HxM, yML

0.04

0.06

PI_3_3_II.nb

25

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + xm2 + H0.03 + ymL2 == 0 H3L

-0.0144 + H-0.061878 + xmL2 + H0.0499024 + ymL2 == 0 H4L


Solution for M HxM, yML
xM1 = -0.0423153 m
yM1 = -0.109432 m
xM2 = 0.0119255 m
yM2 = 0.0592064 m
Select the correct position for M
constrain: yM > yB
xM = 0.0119255 m
yM = 0.0592064 m
0.06

0.04

0.02
y

-0.02
B
-0.04
-0.04 -0.02

0.02
x

---------------------------------

8p
rad = 288 deg
5

xB = 0.00927051 m
yB = -0.0285317 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

0.04

C
0.06

PI_3_3_II.nb

26

-0.004225 + H-0.00927051 + xcL2 + H0.0285317 + ycL2 == 0 H1L


HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0707374 m
yC1 = -0.0496697 m
xC2 = 0.0280579 m
yC2 = 0.033694 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0707374 m
yC = -0.0496697 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.00927051 + xmL2 + H0.0285317 + ymL2 == 0 H3L


-0.0144 + H-0.0707374 + xmL2 + H0.0496697 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0346275 m
yM1 = -0.1071 m
xM2 = 0.0229806 m
yM2 = 0.0604179 m
Select the correct position for M
constrain: yM > yB
xM = 0.0229806 m
yM = 0.0604179 m

PI_3_3_II.nb

27

0.06

0.04

0.02
y

-0.02
B
-0.04
C
-0.04 -0.02

0.02

0.04

0.06

---------------------------------

17 p
rad = 306 deg
10

xB = 0.0176336 m
yB = -0.0242705 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.0176336 + xcL2 + H0.0242705 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.078041 m
yC1 = -0.0482694 m
xC2 = 0.0334375 m
yC2 = 0.038779 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.078041 m
yC = -0.0482694 m

Equations for M HxM, yML

PI_3_3_II.nb

28

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.0176336 + xmL2 + H0.0242705 + ymL2 == 0 H3L


-0.0144 + H-0.078041 + xmL2 + H0.0482694 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0299027 m
yM1 = -0.100692 m
xM2 = 0.0355022 m
yM2 = 0.0639378 m
Select the correct position for M
constrain: yM > yB
xM = 0.0355022 m
yM = 0.0639378 m

0.06
0.04
0.02
y
0

-0.02

-0.04
-0.04 -0.02

0.02
x

0.04

0.06

C
0.08

---------------------------------

9p
rad = 324 deg
5

xB = 0.0242705 m
yB = -0.0176336 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

-0.004225 + H-0.0242705 + xcL2 + H0.0176336 + ycL2 == 0 H1L

PI_3_3_II.nb
HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

29
H2L

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0823039 m
yC1 = -0.0469103 m
xC2 = 0.0426338 m
yC2 = 0.0447186 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0823039 m
yC = -0.0469103 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.0242705 + xmL2 + H0.0176336 + ymL2 == 0 H3L


-0.0144 + H-0.0823039 + xmL2 + H0.0469103 + ymL2 == 0 H4L
Solution for M HxM, yML
xM1 = -0.0298747 m
yM1 = -0.0895244 m
xM2 = 0.0499141 m
yM2 = 0.0686358 m
Select the correct position for M
constrain: yM > yB
xM = 0.0499141 m
yM = 0.0686358 m

PI_3_3_II.nb

30

M
0.06
0.04
0.02
y
0

D
B

-0.02
-0.04
-0.04 -0.02

0.02
x

0.04

0.06

C
0.08

---------------------------------

19 p
rad = 342 deg
10

xB = 0.0285317 m
yB = -0.00927051 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.0285317 + xcL2 + H0.00927051 + ycL2 == 0 H1L


-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.0812579 m
yC1 = -0.047283 m
xC2 = 0.056704 m
yC2 = 0.049307 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0812579 m
yC = -0.047283 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

PI_3_3_II.nb

31

-0.0081 + H-0.0285317 + xmL2 + H0.00927051 + ymL2 == 0 H3L


Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0144 + H-0.0812579 + xmL2 + H0.047283 + ymL2 == 0 H4L


Solution for M HxM, yML
xM1 = -0.0362142 m
yM1 = -0.0717843 m
xM2 = 0.0673825 m
yM2 = 0.0719121 m
Select the correct position for M
constrain: yM > yB
xM = 0.0673825 m
yM = 0.0719121 m
M
0.06
0.04
0.02
y
0

-0.02
-0.04
-0.04 -0.02

0.02
x

0.04

---------------------------------

2 p rad = 360 deg

xB = 0.03 m
yB = 0 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xDL^2+HyC-yDL^2-CD^2 = 0,

H2L

-0.004225 + H-0.03 + xcL2 + yc2 == 0 H1L

0.06

C
0.08

PI_3_3_II.nb

32

-0.0025 + H-0.065 + xcL2 + yc2 == 0 H2L


Solution for C HxC, yCL
xC1 = 0.0721429 m
yC1 = -0.0494872 m
xC2 = 0.0721429 m
yC2 = 0.0494872 m
Select the correct position for C
constrain: Sign@yBD Sign@yCD
xC = 0.0721429 m
yC = 0.0494872 m

Equations for M HxM, yML

HxM-xBL^2+HyM-yBL^2-BM^2 = 0,

H3L

Hxm-xCL^2+Hym-yCL^2-CM^2 = 0,

H4L

-0.0081 + H-0.03 + xmL2 + ym2 == 0 H3L

-0.0144 + H-0.0721429 + xmL2 + H-0.0494872 + ymL2 == 0 H4L


Solution for M HxM, yML
xM1 = 0.0870858 m
yM1 = -0.0695788 m
xM2 = -0.0477832 m
yM2 = 0.0452745 m
Select the correct position for M
constrain: yM > yB
xM = -0.0477832 m
yM = 0.0452745 m
0.05
0.04

0.03
y
0.02
0.01
0
-0.04 -0.02

B
D
0.02 0.04 0.06

A
0
x

---------------------------------

PI_3_3_II.nb

33

H*All the positions on the same graphic*LShow@Table@graph@iD, 8i, increment - 1<D,


PlotRange 8All, All<, Frame True, AxesOrigin 8xA, yA<,
FrameLabel 8"x", "y"<, Axes 8True, True<, AspectRatio AutomaticD;

0.1

M M M

M
M

0.075
0.05
y

0.025
0

-0.025

M
M
M
M
M

M M M

C CC CCC
C C

B B B CC
B
B
B
B
B
B
B
A
B
B
B
B
B
B
B B B
B

C
-0.05
-0.075-0.05-0.025

0
x

C C
C C CCC
0.025 0.05 0.075

ListPlot@Table@8Mx@iD, My@iD<, 8i, 1, increment<D,


PlotRange 8All, All<, PlotJoined True, Frame True,
Axes 8True, True<, AxesLabel 8"xM", "yM"<, AspectRatio AutomaticD;
yM
0.11
0.1
0.09
0.08
0.07
0.06
0.05

xM
-0.075-0.05-0.025

0.025 0.05

Problem I.3.3

0.02
D

-0.02
B

-0.04
C

-0.04 -0.02

0.02

0.11
0.1
0.09
0.08
0.07
0.06
0.05

0.04

0.06

x
M

-0.075

-0.025 0

0.025 0.05 0.075

Figure PI.3.3

PI_3_4.nb

(*Problem I.3.4*)
Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(* Input data *)
AB=0.03;
BC=0.12;
CD=0.12;
DE=0.07;
CF=0.17;
La=0.025;
Lb=0.105;
R1=0.04;
R4=0.08;
(* Position of joint A *)
xA = yA = 0;
Print["xA= ",xA," [m]"];
Print["yA= ",yA," [m]"];
(* Position of joint E *)
xE = -Sqrt[(R1+R4)^2-La^2];
yE = -La ;
Print["xE= ",xE," [m]"];
Print["yE= ",yE," [m]"];
f =-p/6;
q = p/3;
Print["f = ",f 180/p," [deg]"];
Print["q = ",q 180/p," [deg]"];
(* Position of joint B *)
xB = AB Cos[f] ;
yB = AB Sin[f] ;
Print["xB= ",xB," [m]"];
Print["yB= ",yB," [m]"];
(* Position of joint D *)
xD = xE + DE Cos[q] ;
yD = yE + DE Sin[q] ;
Print["xD= ",xD," [m]"];
Print["yD= ",yD," [m]"];
(* Position of joint C *)
eqCI =(xc-xB)^2+(yc-yB)^2-BC^2 == 0;
eqCII= (xc-xD)^2+(yc-yD)^2-CD^2 == 0;
solutionC=Simplify[Solve[{eqCI,eqCII},{xc,yc}]];
(* Two solutions for C *)
xC1 = xc/.solutionC[[1]];
yC1 = yc/.solutionC[[1]];
xC2 = xc/.solutionC[[2]];
yC2 = yc/.solutionC[[2]];
(* Select the correct position for C *)
If [ yC1yD,
xC=xC1;yC=yC1,xC=xC2;yC=yC2 ];
Print["xC= ",xC," [m]"];
Print["yC= ",yC," [m]"];
(* Position of joint F *)
yF=Lb-La;
xF=xC-Sqrt[CF^2-(yF-yC)^2];
Print["xF= ",xF," [m]"];

yC1 = yc/.solutionC[[1]];
xC2 = xc/.solutionC[[2]];
yC2 = yc/.solutionC[[2]];

PI_3_4.nb
(* Select the correct position for C *)
If [ yC1yD,
xC=xC1;yC=yC1,xC=xC2;yC=yC2 ];
Print["xC= ",xC," [m]"];
Print["yC= ",yC," [m]"];
(* Position of joint F *)
yF=Lb-La;
xF=xC-Sqrt[CF^2-(yF-yC)^2];
Print["xF= ",xF," [m]"];
Print["yF= ",yF," [m]"];
Print["====================================="];
markers=Table[{
Point[{xA,yA}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{xE,yE}],
Point[{xF,yF}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],
Text["C",{xC,yC},{1,0}],
Text["E",{xE,yE},{1,0}],
Text["F",{xF,yF},{1,0}],
Text["D",{xD,yD},{1,0}]}];
graph[increment]=Graphics[{
{RGBColor[1,0,0],Line[{{xA,yA},{xB,yB}}]},
{RGBColor[1,0,1],Line[{{xB,yB},{xC,yC}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]},
{RGBColor[0,1,1],Line[{{xD,yD},{xE,yE}}]},
{RGBColor[0,0,1],Line[{{xC,yC},{xF,yF}}]},
{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];

Show[Graphics[graph[increment]],
PlotRange{All,All},
FrameTrue,AxesOrigin{0,0},FrameLabel{"x","y"},
Axes{True,True},AspectRatioAutomatic];
xA= 0 @mD
yA= 0 @mD

xE= -0.117367 @mD


yE= -0.025 @mD
f = -30 @degD
q = 60 @degD

xB= 0.0259808 @mD


yB= -0.015 @mD

xD= -0.0823669 @mD


yD= 0.0356218 @mD
xC= 0.0158469 @mD

PI_3_4.nb

yC= 0.104571 @mD

xF= -0.152368 @mD


yF= 0.08 @mD

=====================================
C

0.1
0.08F
0.06
y 0.04

0.02
0

A
B

-0.02

E
-0.15-0.125-0.1 -0.075-0.05-0.025
x

0.025

PI_3_5.nb

(*Problem I.3.5*)
Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(*
AB
BC
CD
Lc
CE
EF
La
Lb

Input data *)
= 0.15 ;
= 0.40 ;
= 0.37 ;
= CD ;
= 0.23 ;
= CE ;
= 0.30 ;
= 0.45 ;

(* m *)
(* m *)
(* m *)
(* m *)
(* m *)
(* m *)

xD = La ;
yD = Lb ;
xF = - Lc ;
pi = N [ Pi ] ;
fi = pi / 4 ;
(* Position of joint A(0,0) *)
(* Position of joint B *)
xB = AB Cos [ fi ] ;
yB = AB Sin [ fi ] ;
Print["xB= ",xB," [m]"];
Print["yB= ",yB," [m]"];
(* Position of joint C *)
eq23a = ( xc - xB )^2 + ( yc - yB )^2 - BC^2 ;
eq23b = ( xc - xD )^2 + ( yc - yD )^2 - CD^2 ;
solution = Solve [ { eq23a == 0 , eq23b == 0 },
{ xc , yc } ] ;
(* Two solutions for C *)
xc1 = xc /. solution [ [ 1 ] ] ;
yc1 = yc /. solution [ [ 1 ] ] ;
xc2 = xc /. solution [ [ 2 ] ] ;
yc2 = yc /. solution [ [ 2 ] ] ;
(* Select the correct position for C *)
If [ xc1 < xD , xC = xc1 ; yC = yc1 ,
xC = xc2 ; yC = yc2 ] ;
Print["xC= ",xC," [m]"];
Print["yC= ",yC," [m]"];
(* Position of joint E *)
(* Parameters m and n of line CD: y=n x + n *)
m = ( yC - yD ) / ( xC - xD ) ;
n = yC - m xC ;
eq24 = ( xe - xC )^2 + ( ye - yC )^2 - CE^2 ;
eq27 = ye - m xe - n ;
solutionE = Solve [ { eq24 == 0 , eq27 == 0 } ,
{ xe , ye } ] ;
(* Two solutions for E *)
xe1 = xe /. solutionE [ [ 1 ] ] ;
ye1 = ye /. solutionE [ [ 1 ] ] ;
xe2 = xe /. solutionE [ [ 2 ] ] ;
ye2 = ye /. solutionE [ [ 2 ] ] ;
(* Select the correct position for E *)
If [ xe1 <= xC , xE = xe1 ; yE = ye1 ,
xE = xe2 ; yE = ye2 ];
Print["xE= ",xE," [m]"];
Print["yE= ",yE," [m]"];
(* Position of joint F *)

solutionE = Solve [ { eq24 == 0 , eq27 == 0 } ,


{ xe , ye } ] ;
(* Two solutions for E *)
PI_3_5.nbxe1 = xe /. solutionE [ [ 1 ] ] ;
ye1 = ye /. solutionE [ [ 1 ] ] ;
xe2 = xe /. solutionE [ [ 2 ] ] ;
ye2 = ye /. solutionE [ [ 2 ] ] ;
(* Select the correct position for E *)
If [ xe1 <= xC , xE = xe1 ; yE = ye1 ,
xE = xe2 ; yE = ye2 ];
Print["xE= ",xE," [m]"];
Print["yE= ",yE," [m]"];
(* Position of joint F *)
eq28 = ( xE - xF )^2 + ( yE - yf )^2 - EF^2 ;
solutionF = Solve [ { eq28 == 0 } , { yf } ] ;
(* Two solutions for yF *)
yf1 = yf /. solutionF [ [ 1 ] ] ;
yf2 = yf /. solutionF [ [ 2 ] ] ;
(* Select the correct position for yF *)
If [ yf1 < yE , yF = yf1 ,
yF = yf2 ] ;
Print["xF= ",xF," [m]"];
Print["yF= ",yF," [m]"];
(********)
(*Link 2*)
(********)
f2=ArcTan[(yB-yC)/(xB-xC)];
"f2=ArcTan[(yB-yC)/(xB-xC)]"
Print["f2 = ",f2," rad = ",f2*180/N[Pi]," deg "];
(********)
(*Link 3*)
(********)
f3=ArcTan[(yC-yD)/(xC-xD)];
"f3=ArcTan[(yC-yD)/(xC-xD)]"
Print["f3 = ",f3," rad = ",f3*180/N[Pi]," deg "];
(********)
(*Link 4*)
(********)
f4=ArcTan[(yF-yE)/(xF-xE)];
"f4=ArcTan[(yF-yE)/(xF-xE)]"
Print["f4 = ",f4," rad = ",f4*180/N[Pi]," deg "];
markers = Table [
Point
Point
Point
Point
Point
Point
Point
Point
}
name = Table [ {
Text
Text
Text
Text
Text
Text
Text

{
[
[
[
[
[
[
[
[
]

{
{
{
{
{
{
{
{
;

0 , 0 } ]
xB , yB }
xC , yC }
xD , yD }
xE , yE }
xF , yF }
(xF+xE)/2
(xB+xC)/2

,
]
]
]
]
]
,
,

,
,
,
,
,
(yF+yE)/2 } ],
(yB+yC)/2 } ]

"A" ,{0 , 0 },{ 3 , 0 } ]


"B" ,{xB , yB },{-2 , 0 } ]
"C" ,{xC , yC },{-2 ,-2 } ]
"D" ,{xD , yD },{-3 , 0 } ]
"E" ,{xE , yE },{3 , 0 } ]
"F" ,{xF , yF },{3 , 0 } ]
"C4",{(xF+xE)/2,(yF+yE)/2 }
{-2 , 0 } ]
Text [ "C2" ,{(xB+xC)/2,(yB+yC)/2}
{ 2 , 0 } ]
} ] ;

graph

[
[
[
[
[
[
[

= Graphics [
{ { RGBColor
Line [ {
{ RGBColor
Line [ {
{ RGBColor

[ 1 , 0 , 0 ] ,
{0,0},{xB,yB} } ] } ,
[ 0 , 0 , 1 ] ,
{xB,yB} , {xC,yC}} ] } ,
[ 1 , 0, 1 ] ,

,
,
,
,
,
,
,
,
,

PI_3_5.nb

graph

Text
Text
Text
Text

[
[
[
[

"D" ,{xD , yD },{-3 , 0 } ]


"E" ,{xE , yE },{3 , 0 } ]
"F" ,{xF , yF },{3 , 0 } ]
"C4",{(xF+xE)/2,(yF+yE)/2 }
{-2 , 0 } ]
Text [ "C2" ,{(xB+xC)/2,(yB+yC)/2}
{ 2 , 0 } ]
} ] ;
= Graphics [
{ { RGBColor [ 1 , 0 , 0 ] ,
Line [ { {0,0},{xB,yB} } ] } ,
{ RGBColor [ 0 , 0 , 1 ] ,
Line [ { {xB,yB} , {xC,yC}} ] } ,
{ RGBColor [ 1 , 0, 1 ] ,
Line [ { {xD,yD}, {xE,yE}} ] } ,
{ RGBColor [ 0 , 0 , 0 ] ,
Line [ { {xE,yE},{xF,yF} } ] } ,
{ RGBColor [ 0 , 1 , 1 ] ,
PointSize [ 0.01 ] , markers } ,
{ name } } ] ;

Show [ Graphics [ graph ] ,


PlotRange -> { { -.5 , .5 } ,
{ -.2 , .7 } } ,
Frame -> True,
AxesOrigin -> {0,0},
FrameLabel->{"x","y"},
Axes -> {True,True},
AspectRatio -> Automatic ] ;
xB= 0.106066 @mD
yB= 0.106066 @mD

xC= -0.0696798 @mD


yC= 0.46539 @mD

xE= -0.299481 @mD


yE= 0.474956 @mD
xF= -0.37 @mD

yF= 0.256034 @mD

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = -1.11591 rad = -63.9367 deg

f3=ArcTan@HyC-yDLHxC-xDLD
f3 = -0.0416054 rad = -2.38381 deg

f4=ArcTan@HyF-yELHxF-xELD
f4 = 1.25917 rad = 72.1452 deg

,
,
,
,
,
,

PI_3_5.nb

0.6
C

E
0.4

y
0.2

D
C4
C2

B
0

-0.4

-0.2

0
x

0.2

0.4

PI_3_6.nb

(* Problem I.3.6 *)
Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(* Input data *)
AB=0.080;
BC=0.350;
CD=0.150;
CE=0.200;
La=0.200;
Lb=0.350;
Lc=0.040;
f=135 p/180.;
(* Position of joint A *)
xA = yA = 0;
Print["xA = ",xA," m "];
Print["yA = ",yA," m "];
(* Position of joint E *)
xE=La;
yE=Lb;
Print["xE = ",xE," m "];
Print["yE = ",yE," m "];
(* Position of joint B *)
xB = AB Cos[f] ;
yB = AB Sin[f] ;
Print["xB = ",xB," m "];
Print["yB = ",yB," m "];
(***********)
(* Joint C *)
(***********)
Print["Equations for C (xC, yC)"];
"(xC-xB)^2+(yC-yB)^2-BC^2 = 0,
(1)"
eqCI = (xc-xB)^2+(yc-yB)^2-BC^2 == 0;
Print[eqCI," (1)"];
"(xC-xE)^2+(yC-yE)^2-CE^2 = 0,
(2)"
eqCII = (xc-xE)^2+(yc-yE)^2-CE^2 == 0;
Print[eqCII," (2)"];
Print["Solution for C (xC, yC)"];
solutionC=Simplify[Solve[{eqCI,eqCII},{xc,yc}]];
(* Two solutions for C *)
xC1 = xc/.solutionC[[1]];
yC1 = yc/.solutionC[[1]];
xC2 = xc/.solutionC[[2]];
yC2 = yc/.solutionC[[2]];
Print["xC1
Print["yC1
Print["xC2
Print["yC2

=
=
=
=

",xC1,"
",yC1,"
",xC2,"
",yC2,"

m"];
m"];
m"];
m"];

"condition xC > xE =>"


If[xC1>xE,xC=xC1;yC=yC1,xC=xC2;yC=yC2];
Print["xC = ",xC," m"];
Print["yC = ",yC," m"];
(***********)
(* Joint D *)
(***********)
Print["Equations for D (xD, yD)"];
"(xD-xC)^2+(yD-yC)^2-CD^2 = 0,
(3)"
eqDI = (xd-xC)^2+(yd-yC)^2-CD^2 == 0;
Print[eqDI," (3)"];
"(yC-yE)/(xC-xE) = (yD-yE)/(xD-xE),
(4)"
eqDII = (yC-yE)/(xC-xE) == (yd-yE)/(xd-xE);
Print[eqDII," (4)"];

If[xC1>xE,xC=xC1;yC=yC1,xC=xC2;yC=yC2];
Print["xC = ",xC," m"];
PI_3_6.nbPrint["yC = ",yC," m"];
(***********)
(* Joint D *)
(***********)
Print["Equations for D (xD, yD)"];
"(xD-xC)^2+(yD-yC)^2-CD^2 = 0,
(3)"
eqDI = (xd-xC)^2+(yd-yC)^2-CD^2 == 0;
Print[eqDI," (3)"];
"(yC-yE)/(xC-xE) = (yD-yE)/(xD-xE),
(4)"
eqDII = (yC-yE)/(xC-xE) == (yd-yE)/(xd-xE);
Print[eqDII," (4)"];
Print["Solution for D (xD, yD)"];
solutionC=Simplify[Solve[{eqDI,eqDII},{xd,yd}]];
(* Two solutions for D *)
xD1 = xd/.solutionC[[1]];
yD1 = yd/.solutionC[[1]];
xD2 = xd/.solutionC[[2]];
yD2 = yd/.solutionC[[2]];
Print["xD1
Print["yD1
Print["xD2
Print["yD2

=
=
=
=

",xD1,"
",yD1,"
",xD2,"
",yD2,"

m"];
m"];
m"];
m"];

"condition xD > xC =>"


If[xD1>xC,xD=xD1;yD=yD1,xD=xD2;yD=yD2];
Print["xD = ",xD," m"];
Print["yD = ",yD," m"];
(***********)
(* Point F *)
(***********)
xF=xD;
yF=-Lc;
Print["xF = ",xF," m"];
Print["yF = ",yF," m"];
(********)
(*Link 2*)
(********)
f2=ArcTan[(yB-yC)/(xB-xC)];
"f2=ArcTan[(yB-yC)/(xB-xC)]"
Print["f2 = ",f2," rad = ",f2*180/N[Pi]," deg "];
(********)
(*Link 3*)
(********)
f3=ArcTan[(yC-yE)/(xC-xE)];
"f3=ArcTan[(yC-yE)/(xC-xE)]"
Print["f3 = ",f3," rad = ",f3*180/N[Pi]," deg "];
markers=Table[{Point[{0,0}],
Point[{xB,yB}],
Point[{xC,yC}],
Point[{xD,yD}],
Point[{xE,yE}],
Point[{xF,yF}],
Point[{-0.05,0}]}];
name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],
Text["C",{xC,yC},{-1,-1}],
Text["D",{xD,yD},{1,0}],
Text["E",{xE,yE},{1,0}],
Text["F",{xF,yF},{1,0}]
}];
graph[increment]=Graphics[{
{RGBColor[1,0,0],Line[{{xA,yA},{xB,yB}}]},
{RGBColor[0,1,0],Line[{{xB,yB},{xC,yC}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xE,yE}}]},
{RGBColor[1,0,1],Line[{{xD,yD},{xF,yF}}]},
{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];

name=Table[{Text["A",{0,0},{1,0}],
Text["B",{xB,yB},{-1,-1}],
Text["C",{xC,yC},{-1,-1}],
PI_3_6.nb
Text["D",{xD,yD},{1,0}],
Text["E",{xE,yE},{1,0}],
Text["F",{xF,yF},{1,0}]
}];

graph[increment]=Graphics[{
{RGBColor[1,0,0],Line[{{xA,yA},{xB,yB}}]},
{RGBColor[0,1,0],Line[{{xB,yB},{xC,yC}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]},
{RGBColor[0,0,0],Line[{{xC,yC},{xE,yE}}]},
{RGBColor[1,0,1],Line[{{xD,yD},{xF,yF}}]},
{RGBColor[0,1,1],PointSize[0.01],markers},{name}}];
Show[Graphics[graph[increment]],
PlotRange{All,All},
FrameTrue,AxesOrigin{0,0},FrameLabel{"x","y"},
Axes{True,True},AspectRatioAutomatic];
xA = 0 m
yA = 0 m
xE = 0.2 m
yE = 0.35 m
xB = -0.0565685 m
yB = 0.0565685 m

Equations for C HxC, yCL

HxC-xBL^2+HyC-yBL^2-BC^2 = 0,

H1L

HxC-xEL^2+HyC-yEL^2-CE^2 = 0,

H2L

-0.1225 + H0.0565685 + xcL2 + H-0.0565685 + ycL2 == 0 H1L


-0.04 + H-0.2 + xcL2 + H-0.35 + ycL2 == 0 H2L
Solution for C HxC, yCL
xC1 = 0.00656629 m
yC1 = 0.400827 m
xC2 = 0.276186 m
yC2 = 0.165079 m

condition xC > xE =>


xC = 0.276186 m
yC = 0.165079 m

Equations for D HxD, yDL

HxD-xCL^2+HyD-yCL^2-CD^2 = 0,

H3L

-0.0225 + H-0.276186 + xdL2 + H-0.165079 + ydL2 == 0 H3L

HyC-yELHxC-xEL = HyD-yELHxD-xEL,
-0.35 + yd
-2.42724 == H4L
-0.2 + xd

H4L

PI_3_6.nb

Solution for D HxD, yDL


xD1 = 0.333325 m
yD1 = 0.0263885 m
xD2 = 0.219046 m
yD2 = 0.30377 m

condition xD > xC =>


xD = 0.333325 m
yD = 0.0263885 m
xF = 0.333325 m
yF = -0.04 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 0.315225 rad = 18.0611 deg

f3=ArcTan@HyC-yELHxC-xELD
f3 = -1.18 rad = -67.6088 deg
E
0.3
0.2

y
0.1
0

B
D

A
0

0.1

0.2
x

F
0.3

PI_3_7.nb

H*Problem I .3 .7*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*L
AB = 0.040;
AD = 0.150;
BC = 0.100;
CE = 0.030;
EF = 0.120;
a = 0.090;
phi = Pi 6;

H*Position of joint A*L


xA = yA = 0;
H* Position of joint D *L
xD = AD;
yD = 0;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
H* Position of joint C *L
eqnC1 = H xCsol - xB L ^ 2 + H yCsol - yB L ^ 2 - BC ^ 2 0 ;
eqnC2 = H yCsol - yB L H xCsol - xB L H yB - yDL HxB - xDL;
solutionC = Solve@ 8eqnC1 , eqnC2< , 8xCsol , yCsol< D; H* Two solutions for C *L
xC1 = xCsol . solutionC@@1DD;
yC1 = yCsol . solutionC@@1DD;
xC2 = xCsol . solutionC@@2DD;
yC2 = yCsol . solutionC@@2DD;
If @xC1 >= 0 , xC = xC1 ; yC = yC1 , xC = xC2 ; yC = yC2 D;

H* Position of joint E *L
eqnE1 = HHyEsol - yCL HxEsol - xCLL HHyB - yDL HxB - xDLL -1;
eqnE2 = HxEsol - xCL ^ 2 + HyEsol - yCL ^ 2 - CE ^ 2 0;
solutionE = Solve @ 8 eqnE1, eqnE2< , 8 xEsol , yEsol < D;
H* Two solutions for E *L
xE1 = xEsol . solutionE@@1DD;
yE1 = yEsol . solutionE@@1DD;
xE2 = xEsol . solutionE@@2DD;
yE2 = yEsol . solutionE@@2DD; If @ yE1 < yC, xE = xE1; yE = yE1, xE = xE2; yE = yE2D;
H* Position of joint F *L
xF = a;
yF = yE - Sqrt@EF^ 2 - HxF - xEL ^ 2D ;
Print@"phi = ", phi, " rad
Print@"AH", xA, ",", yA, "L
Print@"BH", xB, ",", yB, "L
Print@"CH", xC, ",", yC, "L
Print@"DH", xD, ",", yD, "L
Print@"EH", xE, ",", yE, "L
Print@"FH", xF, ",", yF, "L

= ", phi 180 N@PiD, " deg"D;


@mD"D;
@mD"D;
@mD"D;
@mD"D;
@mD"D;
@mD"D;

PI_3_7.nb
H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H********L
H*Link 4*L
H********L
f4 = ArcTan@HyF - yEL HxF - xELD;
"f4=ArcTan@HyF-yELHxF-xELD"
Print@"f4 = ", f4, " rad = ", f4 * 180 N@PiD, " deg "D;
H*Graph of the mecanism*L
markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D,
Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;
name = Table@8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D,
Text@"C", 8xC, yC<, 8-1, -1<D, Text@"D", 8xD, yD<, 8-1, -1<D,
Text@"E", 8xE, yE<, 8-1, 1<D, Text@"F", 8xF, yF<, 8-1, 1<D<D;

graph@incrementD = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,


8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xD, yD<<D<, 8RGBColor@0, 0, 1D,
Line@88xC, yC<, 8xE, yE<<D<, 8RGBColor@1, 0, 1D, Line@88xE, yE<, 8xF, yF<<D<,
8RGBColor@1, 1, 1D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graph@incrementDD,
PlotRange 88-.05, .25<, 8-.16, .125<<, Frame True, AxesOrigin 8xA, yA<,
FrameLabel 8"x", "y"<, Axes 8True, True<, AspectRatio AutomaticD;
p
phi = rad = 30. deg
6
AH0,0L @mD

BH0.034641,0.02L @mD

CH0.133171,0.00291764L @mD
DH0.15,0L @mD

EH0.128046,-0.0266414L @mD
FH0.09,-0.14045L @mD

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = -0.171665 rad = -9.83571 deg

f4=ArcTan@HyF-yELHxF-xELD
f4 = 1.24817 rad = 71.5151 deg

PI_3_7.nb

0.1

0.05
B
0
y

C D
A
E

-0.05

-0.1

-0.15
0

0.05

0.1
x

0.15

0.2

0.25

PI_3_8.nb
H*Problem I .3 .8*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*L
AB = .250;
AE = .640;
BC = .240;
BD = .670;
CD = .660;
CF = .850;
DE = .420;
b = .170;
phi = Pi 6.;

H*Position of joint A*L


xA = 0;
yA = 0;
Print@"xA = ", xA, " @mD"D;
Print@"yA = ", yA, " @mD"D;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
Print@"xB = ", xB, " @mD"D;
Print@"yB = ", yB, " @mD"D;

H*Position of joint E*L


yE = -b;
eqnE1 = HxEsol - xAL ^ 2 + HyE - yAL ^ 2 - AE^ 2 0;
solutionE = Solve@8eqnE1<, 8xEsol<D;
H*Solution for xE*L
xE1 = xEsol . solutionE@@1DD;
xE2 = xEsol . solutionE@@2DD;
H*Select Correct Position for E*L
xE = If@xE1 xA, xE1, xE2D;
Print@"xE = ", xE, " @mD "D;
Print@"yE = ", yE, " @mD "D;

H*Position of joint D*L


eqnD1 = HxB - xDsolL ^ 2 + HyB - yDsolL ^ 2 - BD ^ 2 0;
eqnD2 = HxE - xDsolL ^ 2 + HyE - yDsolL ^ 2 - DE ^ 2 0;
solutionD = Solve@8eqnD1, eqnD2<, 8xDsol, yDsol<D;
H*Two solutions for D*L
xD1 = xDsol . solutionD@@1DD;
yD1 = yDsol . solutionD@@1DD;
xD2 = xDsol . solutionD@@2DD;
yD2 = yDsol . solutionD@@2DD;

H*Select the Correct Position of D*L


If@yE yD1, xD = xD1; yD = yD1, xD = xD2; yD = yD2D;
Print@"xD= ", xD , " @mD "D;
Print@"yD= ", yD , " @mD "D;
H*Position of joint C*L

PI_3_8.nb
eqnC1 = HxB - xCsolL ^ 2 + HyB - yCsolL ^ 2 - BC ^ 2 0;
eqnC2 = HxD - xCsolL ^ 2 + HyD - yCsolL ^ 2 - CD ^ 2 0;
solutionC = Solve@8eqnC1, eqnC2<, 8xCsol, yCsol<D;
H*Two solutions for D*L
xC1 = xCsol . solutionC@@1DD;
yC1 = yCsol . solutionC@@1DD;
xC2 = xCsol . solutionC@@2DD;
yC2 = yCsol . solutionC@@2DD;

H*Select the Correct Position of C*L


If@yB yC1, xC = xC1; yC = yC1, xC = xC2; yC = yC2D;
Print@"xC= ", xC , " @mD "D;
Print@"yC= ", yC , " @mD "D;
H*Position of joint F*L
yF = 0;
eqnF1 = HxC - xFsolL ^ 2 + HyCL ^ 2 - CF ^ 2 0;
solutionF = Solve@8eqnF1<, 8xFsol<D;
H*Two solutions for xF*L
xF1 = xFsol . solutionF@@1DD;
xF2 = xFsol . solutionF@@2DD;
H*Select Correct Position for F*L
xF = If@xF1 xC, xF1, xF2D;
Print@"xF= ", xF , " m "D;
Print@"yF= ", yF , " m "D;

H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H********L
H*Link 3*L
H********L
f3 = ArcTan@HyE - yDL HxE - xDLD;
"f3=ArcTan@HyE-yDLHxE-xDLD"
Print@"f3 = ", f3, " rad = ", f3 * 180 N@PiD, " deg "D;
H********L
H*Link 4*L
H********L
f4 = ArcTan@HyF - yCL HxF - xCLD;
"f4=ArcTan@HyF-yCLHxF-xCLD"
Print@"f4 = ", f4, " rad = ", f4 * 180 N@PiD, " deg "D;
H*Graph of the mechanism*L
markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D,
Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;
name = Table@8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D,
Text@"C", 8xC, yC<, 8-1, -1<D, Text@"D", 8xD, yD<, 80, -1<D,
Text@"E", 8xE, yE<, 8-1, 1<D, Text@"F", 8xF, yF<, 8-1, 1<D<D;

PI_3_8.nb

graph = Graphics@8
8RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 0, 1D, Line@88xB, yB<, 8xD, yD<<D<, 8RGBColor@0, 1, 1D,
Line@88xD, yD<, 8xE, yE<<D<, 8RGBColor@0, 0, 1D, Line@88xB, yB<, 8xC, yC<<D<,
8RGBColor@1, 1, 0D, Line@88xC, yC<, 8xF, yF<<D<, 8RGBColor@0, 0, 1D,
Line@88xC, yC<, 8xD, yD<<D<, 8RGBColor@0, 0, 0D, PointSize@0.035D, markers<,
8RGBColor@1, 1, 1D, PointSize@0.02D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 88-.25, 1.3<, 8-.3, .45<<, Frame True,
AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;

xA = 0 @mD
yA = 0 @mD

xB = 0.216506 @mD
yB = 0.125 @mD

xE = 0.617009 @mD
yE = -0.17 @mD

xD= 0.885937 @mD


yD= 0.152611 @mD
xC= 0.259725 @mD
yC= 0.361077 @mD
xF= 1.02922 m
yF= 0 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 1.38973 rad = 79.6258 deg

f3=ArcTan@HyE-yDLHxE-xDLD
f3 = 0.8759 rad = 50.1854 deg

f4=ArcTan@HyF-yCLHxF-xCLD
f4 = -0.438737 rad = -25.1378 deg
0.4

0.3
0.2
y 0.1
0
-0.1

B
A

-0.2
-0.2

E
0

0.2

0.4

0.6
x

0.8

1.2

PI_3_9.nb

(*Problem I.3.9*)
Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
initdata = {AB->0.12, AC->0.06, BD->0.24, DE->0.33,EF->0.19,La->.3, Lb->.07, phi>N[Pi]150/180};
(* Position of joint A *)
xA = yA = 0;
(* Position of joint C *)
xC = -AC ;
yC = 0 ;
(* Position of joint F *)
xF = La ;
yF = Lb ;
(* Position of joint B *)
xB = AB Cos[phi] ;
yB = AB Sin[phi] ;
Print["xB = ", xB ," = ", xB/.initdata, " m" ];
Print["yB = ", yB ," = ", yB/.initdata, " m" ];
(* Position of joint D *)
eqnD1 = ( xDsol - xB )^2 + ( yDsol - yB )^2 - BD^2 == 0 ;
eqnD2 = ( yDsol - yB ) / ( xDsol - xB ) == ( yB - yC ) / ( xB - xC );
solutionD = Solve [ { eqnD1 , eqnD2 } , { xDsol , yDsol } ];
(* Two solutions for D *)
xD1 = xDsol /. solutionD[[1]];
yD1 = yDsol /. solutionD[[1]];
xD2 = xDsol /. solutionD[[2]];
yD2 = yDsol /. solutionD[[2]];
If [ (yD1/.initdata) <= 0 , xD = xD1 ; yD = yD1 , xD = xD2 ; yD=yD2 ] ;
Print["xD = ",xD/.initdata," m"];
Print["yD = ",yD/.initdata," m"];
(* Position of joint E *)
eqnE1 = ( xEsol - xD )^2 + ( yEsol - yD )^2 - DE^2 == 0;
eqnE2 = ( xEsol - xF )^2 + ( yEsol - yF )^2 - EF^2 == 0;
(*Mathematica 5 cannot solve the next system *)
(*Use Mathematica 4.2*)
solutionE = Solve [ { eqnE1 , eqnE2 } , { xEsol , yEsol } ];
(*Two solutions for E*)
xE1=xEsol/.solutionE[[1]];
yE1=yEsol/.solutionE[[1]];
xE2=xEsol/.solutionE[[2]];
yE2=yEsol/.solutionE[[2]];
If[(yE1/.initdata)0,xE=xE1;yE=yE1,xE=xE2;yE=yE2];
Print["xE = ",xE/.initdata," m"];
Print["yE = ",yE/.initdata," m"];
(********)
(*Link 2*)
(********)
f2=ArcTan[(yB-yC)/(xB-xC)]/.initdata;
"f2=ArcTan[(yB-yC)/(xB-xC)]"
Print["f2 = ",f2," rad = ",f2*180/N[Pi]," deg "];
(********)
(*Link 4*)
(********)
f4=ArcTan[(yE-yD)/(xE-xD)]/.initdata;

If[(yE1/.initdata)0,xE=xE1;yE=yE1,xE=xE2;yE=yE2];
Print["xE = ",xE/.initdata," m"];
Print["yE = ",yE/.initdata," m"];

PI_3_9.nb
(********)
(*Link 2*)
(********)
f2=ArcTan[(yB-yC)/(xB-xC)]/.initdata;
"f2=ArcTan[(yB-yC)/(xB-xC)]"
Print["f2 = ",f2," rad = ",f2*180/N[Pi]," deg "];
(********)
(*Link 4*)
(********)
f4=ArcTan[(yE-yD)/(xE-xD)]/.initdata;
"f4=ArcTan[(yE-yD)/(xE-xD)]"
Print["f4 = ",f4," rad = ",f4*180/N[Pi]," deg "];
(********)
(*Link 5*)
(********)
f5=ArcTan[(yE-yF)/(xE-xF)]/.initdata;;
"f5=ArcTan[(yE-yF)/(xE-xF)]"
Print["f5 = ",f5," rad = ",f5*180/N[Pi]," deg "];
xB = AB Cos@phiD = -0.103923 m
yB = AB Sin@phiD = 0.06 m
xD = 0.0378427 m
yD = -0.133656 m
xE = 0.366833 m
yE = -0.107858 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = -0.938882 rad = -53.794 deg

f4=ArcTan@HyE-yDLHxE-xDLD
f4 = 0.078255 rad = 4.48368 deg

f5=ArcTan@HyE-yFLHxE-xFLD
f5 = -1.21135 rad = -69.4055 deg

PI_3_9.nb

H*GRAPH OF THE MECHANISM*L


xB = xB
yB = yB
xC = xC
yC = yC
xD = xD
yD = yD
xE = xE
yE = yE
xF = xF
yF = yF

. initdata;
. initdata;
. initdata;
. initdata;
. initdata;
. initdata;
. initdata;
. initdata;
. initdata;
. initdata;

markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D,


Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;
name = Table@8
Text@"A",
Text@"B",
Text@"C",
Text@"D",
Text@"E",
Text@"F",

80, 0<, 8-1, 1<D,


8xB, yB<, 8-1.5, 0<D,
8xC, yC<, 8-1, -1<D,
8xD, yD<, 8-1, -1<D,
8xE, yE<, 8-0.5, 1<D,
8xF, yF<, 8-2, 1<D<D;

graph = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,


8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xC, yC<<D<,
8RGBColor@0, 1, 0D, Line@88xC, yC<, 8xD, yD<<D<, 8RGBColor@0, 0, 1D,
Line@88xD, yD<, 8xE, yE<<D<, 8RGBColor@0, 1, 1D, Line@88xE, yE<, 8xF, yF<<D<,
8RGBColor@0, 0, 0D, PointSize@0.02D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 8All, All<, Frame True, AxesOrigin 8xA, yA<,
FrameLabel 8"x", "y"<, Axes 8True, True<, AspectRatio AutomaticD;

0.05

0
y
-0.05

F
C
A

-0.1
D
-0.1

E
0.1

0.2
x

0.3

PI_3_10.nb

H*Problem I .3 .10*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
initdata = 8AB .1, BC .26, AD .24, DE .08, EF .25, CD .14, La .02, phi N@PiD 4<;
H*Position of joint A*L
xA = yA = 0;
Print@"xA = ", xA, " m"D;
Print@"yA = ", yA, " m"D;
H*Postiton of joint D*L
xD = AD . initdata;
yD = 0;
Print@"xD = ", xD, " m"D;
Print@"yD = ", yD, " m"D;
H*Position of joint B*L
xB = AB Cos@phiD . initdata;
yB = AB Sin@phiD . initdata;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;
H*Position of joint C*L
eqnC1 = HxB - xCsolL ^ 2 + HyB - yCsolL ^ 2 - BC ^ 2 0;
eqnC2 = HxCsol - xDL^ 2 + HyCsol - yDL ^ 2 - CD ^ 2 0;
solutionC = Solve@8eqnC1, eqnC2<, 8xCsol, yCsol<D;
H*Two solutions for C*L
xC1 = xCsol . solutionC@@1DD . initdata;
yC1 = yCsol . solutionC@@1DD . initdata;
xC2 = xCsol . solutionC@@2DD . initdata;
yC2 = yCsol . solutionC@@2DD . initdata;
H*Select the correct position for C*L
If@yC1 0, xC = xC1; yC = yC1, xC = xC2; yC = yC2D;
Print@"xC = ", xC, " m"D;
Print@"yC = ", yC, " m"D;
H*Position of joint E*L
eqnE1 = HyEsol - yDL HxEsol - xDL == HyC - yDL HxC - xDL;
eqnE2 = HxEsol - xDL^ 2 + HyEsol - yDL ^ 2 - DE ^ 2 0;
solutionE = Solve@8eqnE1, eqnE2<, 8xEsol, yEsol<D;
H*Two solutions for C*L
xE1 = xEsol . solutionE@@1DD . initdata;
yE1 = yEsol . solutionE@@1DD . initdata;
xE2 = xEsol . solutionE@@2DD . initdata;
yE2 = yEsol . solutionE@@2DD . initdata;
H*Select the correct position for E*L
If@0 yE1, xE = xE1; yE = yE1, xE = xE2; yE = yE2D;
H*another way of calculating the position for EE*L
phi3 = ArcTan@HyD - yCL HxD - xCLD;
xE = xC - HCD + DEL Cos@phi3D . initdata;
yE = yC - HCD + DEL Sin@phi3D . initdata;
Print@"xE = ", xE, " m"D;

PI_3_10.nb

Print@"yE = ", yE, " m"D;


H*Position of joint F*L
yF = -La . initdata;
xF = xE + Sqrt@EF ^ 2 - HyF - yEL^ 2D . initdata;
Print@"xF = ", xF, " m"D;
Print@"yF = ", yF, " m"D;
H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H********L
H*Link 3*L
H********L
f3 = ArcTan@HyC - yDL HxC - xDLD;
"f3=ArcTan@HyC-yDLHxC-xDLD"
Print@"f3 = ", f3, " rad = ", f3 * 180 N@PiD, " deg "D;
H********L
H*Link 4*L
H********L
f4 = ArcTan@HyF - yEL HxF - xELD;
"f4=ArcTan@HyF-yELHxF-xELD"
Print@"f4 = ", f4, " rad = ", f4 * 180 N@PiD, " deg "D;
H*Graph of the mecanism*L
markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D,
Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;
name = Table@8Text@"A", 8xA, yA<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D,
Text@"C", 8xC, yC<, 8-1, 1<D, Text@"D", 8xD, yD<, 8-1, -1<D,
Text@"E", 8xE, yE<, 80, -1<D, Text@"F", 8xF, yF<, 80, -1<D<D;

graph = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,


8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xC, yC<<D<,
8RGBColor@0, 0, 1D, Line@88xC, yC<, 8xD, yD<<D<, 8RGBColor@0, 0, 1D,
Line@88xC, yC<, 8xE, yE<<D<, 8RGBColor@0, 1, 1D, Line@88xE, yE<, 8xF, yF<<D<,
8RGBColor@1, 1, 1D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 8All, All<, Frame True, AxesOrigin 8xA, yA<,
FrameLabel 8"x", "y"<, Axes 8True, True<, AspectRatio AutomaticD;
xA = 0 m
yA = 0 m
xD = 0.24 m
yD = 0 m
xB = 0.0707107 m
yB = 0.0707107 m

PI_3_10.nb

xC = 0.327878 m
yC = 0.108983 m
xE = 0.189784 m
yE = -0.0622763 m
xF = 0.436183 m
yF = -0.02 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 0.14774 rad = 8.46488 deg

f3=ArcTan@HyC-yDLHxC-xDLD
f3 = 0.892198 rad = 51.1192 deg

f4=ArcTan@HyF-yELHxF-xELD
f4 = 0.169922 rad = 9.73579 deg
0.1
0.075
0.05
y 0.025
0
-0.025
-0.05

B
D

A
E
0

0.1

0.2
x

0.3

0.4

PI_3_11.nb
H*Problem I .3 .11*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*L
AB = 0.15;
AC = 0.45;
BD = 0.7;
La = 0.1;
Lb = 0.2;
phi = 120 Pi 180.;

H*Position of joint A*L


xA = yA = 0;
H*Position of joint C*L
xC = -AC;
yC = 0;
H*Position of joint E*L
xE = -AC - La;
yE = Lb;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
H*Position of joint D*L
H*Parameters m and n of line BC:y=m x+b*L
m = HyB - yCL HxB - xCL;
b = yB - m xB;
eqnD1 = HxDsol - xBL^ 2 + HyDsol - yBL ^ 2 - BD ^ 2 0;
eqnD2 = yDsol - m * xDsol - b 0;
solutionD = Solve@8eqnD1, eqnD2<, 8xDsol, yDsol<D;
H*Two solutions for D*LxD1 = xDsol . solutionD@@1DD;
yD1 = yDsol . solutionD@@1DD;
xD2 = xDsol . solutionD@@2DD;
yD2 = yDsol . solutionD@@2DD;
H*Select the correct position for D*L
If@xD1 0, xD = xD1; yD = yD1, xD = xD2; yD = yD2D
Print@"phi = ", phi, " rad = ", phi 180 N@PiD, " deg"D;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;
Print@"xD = ", xD, " m"D;
Print@"yD = ", yD, " m"D;
H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H********L
H*Link 5*L
H********L
f5 = ArcTan@HyE - yDL HxE - xDLD;
"f5=ArcTan@HyE-yDLHxE-xDLD"

PI_3_11.nb

Print@"f5 = ", f5, " rad = ", f5 * 180 N@PiD, " deg "D;
markers = Table@
8Point@8xA, yA<D, Point@8xB, yB<D, Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D<D;
name = Table@
8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D, Text@"C", 8xC, yC<, 8-1, -1<D,
Text@"D", 8xD, yD<, 80, -1<D, Text@"E", 8xE, yE<, 8-1, 1<D<D;
graph = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xD, yD<<D<, 8RGBColor@0, 0, 1D,
Line@88xD, yD<, 8xE, yE<<D<, 8RGBColor@1, 1, 1D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 88-.9, .3<, 8-.7, .7<<, Frame True,
AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;
-0.099225
phi = 2.0944 rad = 120. deg
xB = -0.075 m
yB = 0.129904 m
xD = -0.736438 m
yD = -0.099225 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 0.333473 rad = 19.1066 deg

f5=ArcTan@HyE-yDLHxE-xDLD
f5 = 1.01359 rad = 58.0742 deg

0.6
0.4
0.2
y

B
C

D
-0.2
-0.4
-0.6
-0.8

-0.6

-0.4

-0.2
x

0.2

PI_3_12.nb
H*Problem I .3 .12*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input*L
AB = 0.180;
BD = 0.700;
La = 0.210;
angle = 135;
phi = N@PiD angle 180;
Print@"phi = ", phi, " rad = ", angle, " deg"D;
xA = yA = 0;
xC = -La;
yD = 0;
xE = -La;
yE = -0.24;
Print@"xA = ", xA, " m"D;
Print@"yA = ", yA, " m"D;
H*B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;
H*D*L

eqnD = HxB - xDL ^ 2 + HyB - yDL ^ 2 BD^ 2;


solutionD = Solve@8eqnD<, 8xD<D;
xD1 = xD . solutionD@@1DD;
xD2 = xD . solutionD@@2DD;

If@xD1 xB, xD = xD1, xD = xD2D;


H*C*L
yC = yB - HHyB - yDL HxB - xDLL HxB - xCL;
Print@"xC = ", xC, " m"D;
Print@"yC = ", yC, " m"D;
Print@"xD = ", xD, " m"D;
Print@"yD = ", yD, " m"D;

Print@"xE = ", xE, " m"D;


H********L

PI_3_12.nb

H*Link 2*L
H********L
f2 = ArcTan@HyB - yDL HxB - xDLD;
"f2=ArcTan@HyB-yDLHxB-xDLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H*Graphs*L

markers = Table@
8Point@8xA, yA<D, Point@8xB, yB<D, Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D<D;
name = Table@
8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D, Text@"C", 8xC, yC<, 8-1, -1<D,
Text@"D", 8xD, yD<, 80, -1<D, Text@"E", 8xE, yE<, 81, 1<D<D;
graph = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xD, yD<<D<, 8RGBColor@0, 0, 1D,
Line@88xC, yC<, 8xE, yE<<D<, 8RGBColor@1, 1, 1D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 88-1, 0.25<, 8-0.3, 0.25<<,
Frame True, AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;
phi = 2.35619 rad = 135 deg
xA = 0 m
yA = 0 m
xB = -0.127279 m
yB = 0.127279 m
xC = -0.21 m
yC = 0.111983 m
xD = -0.815611 m
yD = 0 m
xE = -0.21 m

f2=ArcTan@HyB-yDLHxB-xDLD
f2 = 0.182845 rad = 10.4762 deg
0.2

C B

0.1
0
y
-0.1

D
A

-0.2
-0.8

-0.6

-0.4
x

E
-0.2

0.2

PI_3_13.nb

H*Problem I .3 .13*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;

AB
AC
BD
DE
EF
La
Lb

= .100;
= .240;
= .400;
= .250;
= .135;
= .035;
= .170;

phi = 135 Pi 180;

H*Position of joint A*LxA = yA = 0;


H*Position of joint C*L
xC = -AC; yC = 0;
H*Position of joint F*L
xF = -AC + La; yF = Lb;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
H*Position of joint D*L

eqnD1 = HxDsol - xBL^ 2 + HyDsol - yBL ^ 2 - BD ^ 2 0;


eqnD2 = HyDsol - yBL HxB - xCL HyB - yCL HxDsol - xBL;
solutionD = Solve@8eqnD1, eqnD2<, 8xDsol, yDsol<D;
H*Two solutions for D*L
xD1 = xDsol . solutionD@@1DD;
yD1 = yDsol . solutionD@@1DD;
xD2 = xDsol . solutionD@@2DD;
yD2 = yDsol . solutionD@@2DD;
H*Select the correct position for D*L
If@HyD1L 0, xD = xD1; yD = yD1, xD = xD2; yD = yD2D;
H*Position of joint E*L
eqnE1 = HxEsol - xFL^ 2 + HyEsol - yFL ^ 2 - EF ^ 2 0;
eqnE2 = HxEsol - xDL^ 2 + HyEsol - yDL ^ 2 - DE ^ 2 0;
solutionE = Solve@8eqnE1, eqnE2<, 8xEsol, yEsol<D;
H*Two solutions for E*L
xE1 = xEsol . solutionE@@1DD;
yE1 = yEsol . solutionE@@1DD;
xE2 = xEsol . solutionE@@2DD;
yE2 = yEsol . solutionE@@2DD;
H*Select the correct position for E*L
If@HxE1L xF, xE = xE1; yE = yE1, xE = xE2; yE = yE2D;
H*Print phi and the solutions for B,D,and E*L

Print@"phi = ", phi, " rad = ", phi 180 N@PiD, " deg"D;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;

PI_3_13.nb

Print@"xD
Print@"yD
Print@"xE
Print@"yE

=
=
=
=

",
",
",
",

xD,
yD,
xE,
yE,

"
"
"
"

m"D;
m"D;
m"D;
m"D;

H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H********L
H*Link 4*L
H********L
f4 = ArcTan@HyD - yEL HxD - xELD;
"f4=ArcTan@HyD-yELHxD-xELD"
Print@"f4 = ", f4, " rad = ", f4 * 180 N@PiD, " deg "D;
H********L
H*Link 5*L
H********L
f5 = ArcTan@HyF - yEL HxF - xELD;
"f5=ArcTan@HyF-yELHxF-xELD"
Print@"f5 = ", f5, " rad = ", f5 * 180 N@PiD, " deg "D;

H* Graph of the mechanism *L


markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D, Point@8xC, yC<D,
Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;

name = Table@8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D,
Text@"C", 8xC, yC<, 8-1, -1<D, Text@"D", 8xD, yD<, 81, 0<D,
Text@"E", 8xE, yE<, 8-1, 1<D , Text@"F", 8xF, yF<, 80, -1<D <D;
graph@incrementD = Graphics@8
8RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xD, yD<<D<,
8RGBColor@0, 0, 1D, Line@88xD, yD<, 8xE, yE<<D<,
8RGBColor@1, 0, 1D, Line@88xE, yE<, 8xF, yF<<D<,
8RGBColor@1, 1, 1D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graph@incrementDD,
PlotRange 88-.55, .12<, 8-.2, .4<<, Frame True,
AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;
3p
phi = rad = 135. deg
4
xB = -0.0707107 m
yB = 0.0707107 m
xD = -0.439807 m

PI_3_13.nb

yD = -0.0834577 m
xE = -0.337608 m
yE = 0.144699 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 0.395664 rad = 22.6699 deg

f4=ArcTan@HyD-yELHxD-xELD
f4 = 1.14966 rad = 65.8707 deg

f5=ArcTan@HyF-yELHxF-xELD
f5 = 0.188532 rad = 10.8021 deg
0.4

0.3

0.2

F
E

y 0.1

B
C

A
D

-0.1

-0.5

-0.4

-0.3

-0.2
x

-0.1

0.1

PI_3_14.nb
H*Problem I .3 .14*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
initdata = 8
AB 0.12,
BC 0.45,
CD 0.18,
DE 0.18,
EF 0.30,
La 0.45,
Lb 0.15,
Lc 0.14,
phi@tD N@PiD 120 180.<;
H* Position of A*L
xA = yA = 0;

H* Position of D*L
xD = -La;
yD = Lb;
Print@"xD=", xD, "=", xD . initdata, " m"D;
Print@"yD=", yD, "=", yD . initdata, " m"D;
H* Position of B*L
xB = AB Cos@phi@tDD;
yB = AB Sin@phi@tDD;
Print@"xB=", xB, "=", xB . initdata, " m"D;
Print@"yB=", yB, "=", yB . initdata, " m"D;

H* Pos of C*L
eqnC1 = HxCsol - xBL^ 2 + HyCsol - yBL ^ 2 - BC ^ 2 0;
eqnC2 = HxCsol - xDL^ 2 + HyCsol - yDL ^ 2 - CD ^ 2 0;
solutionC = Solve@8eqnC1, eqnC2<, 8xCsol, yCsol<D;
H*2 solns for C*L
xC1 = xCsol . solutionC@@1DD;
yC1 = yCsol . solutionC@@1DD;
xC2 = xCsol . solutionC@@2DD;
yC2 = yCsol . solutionC@@2DD;

If @HyC1 . initdataL < HyC2 . initdataL, xC = xC1; yC = yC1, xC = xC2; yC = yC2D;


Print@"xC=", xC . initdata, " m"D;
Print@"yC=", yC . initdata, " m"D;
phi2 = ArcTan@HyB - yCL HxB - yCLD;
Print@"phi2=", phi2 . initdata, " rad"D;
phi3 = ArcTan@HyD - yCL HxD - xCLD;
Print@"phi3=", phi3 . initdata, " rad"D;
H*Pos of E*L
xE = xC + HHCD + DEL HCos@phi3DLL;
yE = yC + HHCD + DEL HSin@phi3DLL;
Print@"xE=", xE . initdata, " m"D;
Print@"yE=", yE . initdata, " m"D;

PI_3_14.nb

H*Pos of F*L
yF = Lb + Lc;
eqnF = HHyF . initdataL - HyE . initdataLL ^ 2 +
HxFsol - HxE . initdataLL ^ 2 - HEF . initdataL ^ 2 0;
solutionF = Solve@8eqnF<, 8xFsol<D;
xF1 = xFsol . solutionF@@1DD;
xF2 = xFsol . solutionF@@2DD;
H*2 Solutions *L
If@HxF1 . initdataL 0, xF = xF1, xF = xF2D;
Print@"xF=", xF . initdata, " m"D;
Print@"yF=", yF . initdata, " m"D;
H*Angle of 4*L
phi4 = ArcTan@HyF - yEL HxF - xELD;
Print@"phi4=", phi4 . initdata, " rad"D;
H*Graph of the mechanism*L
markers = Table@8
Point@8xA, yA<D,
Point@8xB . initdata,
Point@8xC . initdata,
Point@8xD . initdata,
Point@8xE . initdata,
Point@8xF . initdata,
<D;
name = Table@8
Text@"A",
Text@"B",
Text@"C",
Text@"D",
Text@"E",
Text@"F",
<D;

yB .
yC .
yD .
yE .
yF .

initdata<D,
initdata<D,
initdata<D,
initdata<D,
initdata<D

8xA, yA<, 8-1, 1<D,


8xB . initdata, yB .
8xC . initdata, yC .
8xD . initdata, yD .
8xE . initdata, yE .
8xF . initdata, yF .

graph = Graphics@
88RGBColor@1, 0, 0D,
Line@88xA . initdata,
8RGBColor@0, 1, 0D,
Line@88xB . initdata,
8RGBColor@0, 0, 1D,
Line@88xC . initdata,
8RGBColor@1, 0, 1D,
Line@88xE . initdata,
8RGBColor@1, 1, 1D,
markers<,
8name<<D;

initdata<,
initdata<,
initdata<,
initdata<,
initdata<,

81, -1<D,
80, 1<D,
8-1.5, 0<D,
8-1, 1<D,
80, -1<D

yA . initdata<, 8xB . initdata, yB . initdata<<D<,

yB . initdata<, 8xC . initdata, yC . initdata<<D<,


yC . initdata<, 8xE . initdata, yE . initdata<<D<,
yE . initdata<, 8xF . initdata, yF . initdata<<D<,

Show@Graphics@graphD,
PlotRange 88-.6, .1<,
8-.1, .4<<,
Frame True,
AxesOrigin 8xA . initdata, yA . initdata<,
FrameLabel 8"x", "y"<,
,

PI_3_14.nb

3
Axes 8True, True<,
AspectRatio AutomaticD;

xD=-La=-0.45 m
yD=Lb=0.15 m
xB=AB Cos@phi@tDD=-0.06 m
yB=AB Sin@phi@tDD=0.103923 m
xC=-0.491061 m
yC=-0.0252542 m
phi2=-1.30804 rad
phi3=1.34066 rad
xE=-0.408939 m
yE=0.325254 m
xF=-0.111018 m
yF=0.29 m
phi4=-0.117786 rad
0.4
E

0.3

0.2
y

D
B

0.1
0

C
-0.5

-0.4

-0.3

-0.2
x

-0.1

0.1

PI_3_15.nb
H*Problem I .3 .15*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
AB = 0.14;
BC = 0.65;
CE = 0.25;
CD = 0.40;
EF = 0.35;
La = 0.37;
Lb = 0.55;
Lc = 0.70;
phi = N@PiD 120 180;
H*Position of joint A*L
xA = yA = 0;
H*Position of joint D*L
xD = La;
yD = Lb;
H*Position of joint F*L
yF = Lc;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;
H*Position of joint C*L
eqnC1 = HxCsol - xBL^ 2 + HyCsol - yBL ^ 2 - BC ^ 2 0;
eqnC2 = HxCsol - xDL^ 2 + HyCsol - yDL ^ 2 - CD ^ 2 0;
solutionC = Solve@8eqnC1, eqnC2<, 8xCsol, yCsol<D;
H*Two solutions for C*L
xC1 = xCsol . solutionC@@1DD;
yC1 = yCsol . solutionC@@1DD;
xC2 = xCsol . solutionC@@2DD;
yC2 = yCsol . solutionC@@2DD;

If@HyC1L HyBL, xC = xC1; yC = yC1, xC = xC2; yC = yC2D;


Print@"xC = ", xC, " m"D;
Print@"yC = ", yC, " m"D;
phi2 = ArcTan@HyC - yBL HxC - xBLD;
phi2s = phi2;
Print@"phi2 = ", Hphi2L 180 Pi, " deg"D;
Print@"xD = ", La, " m"D;
Print@"yD = ", Lb, " m"D;
BE = BC + CE;
xE = xB + BE Cos@phi2D;
yE = yB + BE Sin@phi2D;
Print@"xE = ", xE, " m"D;
Print@"yE = ", yE, " m"D;

PI_3_15.nb

xF = xE - HEF^ 2 - HyF - yEL ^ 2L ^ .5;


Print@"xF = ", xF, " m"D;
Print@"yF = ", Lc, " m"D;
phi3 = ArcTan@HyC - yDL HxC - xDLD;
Print@"phi3 = ", phi3 180 Pi, " deg"D;

phi4 = ArcTan@HyE - yFL HxE - xFLD;


Print@"phi4 = ", Hphi4L 180 Pi, " deg"D;

H*Graph of the mecanism*L


markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D,
Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;
name = Table@8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D,
Text@"C", 8xC, yC<, 8-1, -1<D, Text@"D", 8xD, yD<, 80, -1<D,
Text@"E", 8xE, yE<, 8-1, 1<D, Text@"F", 8xF, yF<, 81, 1<D<D;

graph = Graphics@88RGBColor@0, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,


8RGBColor@0, 0, 1D, Line@88xB, yB<, 8xC, yC<<D<,
8RGBColor@0, 0, 1D, Line@88xC, yC<, 8xE, yE<<D<, 8RGBColor@0, 1, 0D,
Line@88xC, yC<, 8xD, yD<<D<, 8RGBColor@1, 0, 0D, Line@88xE, yE<, 8xF, yF<<D<,
8RGBColor@0, 0, 0D, PointSize@0.02D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 88-.15, .4<, 8-.1, 1.1<<,
Frame True, AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;
xB = -0.07 m
yB = 0.121244 m
xC = 0.031589 m
yC = 0.763256 m
phi2 = 81.0083 deg
xD = 0.37 m
yD = 0.55 m
xE = 0.0706617 m
yE = 1.01018 m
xF = -0.0914684 m
yF = 0.7 m
phi3 = -32.2178 deg
phi4 = 62.4043 deg

PI_3_15.nb

0.8

C
F

0.6

y
0.4

0.2
B

A
-0.1

0.1 0.2 0.3 0.4


x

PI_3_16.nb
H*Problem I .3 .16*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
AB = 0.06;
BC = 0.16;
CF = 0.15;
CD = 0.06;
DE = 0.18;
La = 0.21;
Lb = 0.12;
Lc = 0.065;
phi = 30 N@PiD 180;
H*Position of joint A*L
xA = yA = 0;

H*Position of joint F*L


xF = La;
yF = Lb;
Print@"xF = ", La, " m"D;
Print@"yF = ", Lb, " m"D;
H*Position of joint E*L
yE = -Lc;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;
H*Position of joint C*L
eqnC1 = HxCsol - xBL^ 2 + HyCsol - yBL ^ 2 - BC ^ 2 0;
eqnC2 = HxCsol - xFL^ 2 + HyCsol - yFL ^ 2 - CF ^ 2 0;
solutionC = Solve@8eqnC1, eqnC2<, 8xCsol, yCsol<D;
H*Two solutions for C*L
xC1 = xCsol . solutionC@@1DD;
yC1 = yCsol . solutionC@@1DD;
xC2 = xCsol . solutionC@@2DD;
yC2 = yCsol . solutionC@@2DD;

If@HyBL HyC1L, xC = xC1; yC = yC1, xC = xC2; yC = yC2D;


Print@"xC = ", xC, " m"D;
Print@"yC = ", yC, " m"D;
phi2 = ArcTan@HyC - yBL HxC - xBLD;
Print@"phi2 = ", Hphi2L 180 Pi, " deg"D;
BD = BC + CD;
xD = xB + BD Cos@phi2D;
yD = yB + BD Sin@phi2D;
Print@"xD = ", xD, " m"D;
Print@"yD = ", yD, " m"D;
xE = xD + HDE^ 2 - HyE - yDL ^ 2L ^ .5;

PI_3_16.nb

Print@"xE = ", xF, " m"D;


Print@"yE = ", -Lc, " m"D;
phi4 = ArcTan@HyE - yDL HxE - xDLD;
Print@"phi4 = ", Hphi4L 180 Pi, " deg"D;
xF = 0.21 m
yF = 0.12 m
xB = 0.0519615 m
yB = 0.03 m
xC = 0.200409 m
yC = -0.0296931 m
phi2 = -21.9058 deg
xD = 0.256077 m
yD = -0.052078 m
xE = 0.21 m
yE = -0.065 m
phi4 = -4.11675 deg

PI_3_16.nb

H*Graph of the mecanism*L


markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D,
Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;
name = Table@8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1.5<D,
Text@"C", 8xC, yC<, 8-1, -1<D, Text@"D", 8xD, yD<, 80, -1.5<D,
Text@"E", 8xE, yE<, 8-1, -1.2<D, Text@"F", 8xF, yF<, 81, 1<D<D;
graph = Graphics@8
8RGBColor@0, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 0, 1D, Line@88xB, yB<, 8xC, yC<<D<, 8RGBColor@0, 0, 1D,
Line@88xC, yC<, 8xD, yD<<D<, 8RGBColor@1, 0, 0D, Line@88xD, yD<, 8xE, yE<<D<,
8RGBColor@0, 1, 0D, Line@88xC, yC<, 8xF, yF<<D<,
8RGBColor@0, 0, 0D, PointSize@0.015D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 8All, All<, Frame True, AxesOrigin 8xA, yA<,
FrameLabel 8"x", "y"<, Axes 8True, True<, AspectRatio AutomaticD;

F
0.1
0.075
0.05
B
y 0.025
0

A
C

-0.025

-0.05

E
0

0.1

0.2

0.3
x

0.4

PI_3_17.nb
H*Problem I .3 .17*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H* Input data *L
AB = .020; H*m*L
BC = .050; H*m*L
AD = .025; H*m*L
BE = .060; H*m*L
H* Input angle *L
angle = 60;
phi = N@PiD angle 180 ;

H* Position of joint A *L
xA = yA = 0;
H* Position of joint B *L
xB = AB Cos@phiD ;
yB = AB Sin@phiD ;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;
H* Position of joint C *L
xC = 0;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
yC = yB - HBC ^ 2 - xB^ 2L ;
H* Position of joint D *L
xD = 0;
yD = -AD;
H* Print the solutions for B and D and E *L
Print@"xA = ", xA, " mm"D;
Print@"yA = ", yA, " mm"D;
Print@"xB = ", xB, " mm"D;
Print@"yB = ", yB, " mm"D;
Print@"xC = ", xC, " mm"D;
Print@"yC = ", yC, " mm"D;
Print@"xD = ", xD, " mm"D;
Print@"yD = ", yD, " mm"D;
H* Position of joint E *L
m = HHyB - yDL HxB - xDLL;
eqnE1 = H yB - yEsol L ^ 2 + H xB - xEsol L ^ 2 - BE ^ 2 == 0 ;
eqnE2 = HyEsol - yDL HxEsol - xDL - m == 0 ;
solutionE = Solve @ 8 eqnE1 , eqnE2 < , 8 xEsol , yEsol < D;
H* Two solutions for E *L
xE1 = xEsol . solutionE@@1DD;
yE1 = yEsol . solutionE@@1DD;
xE2 = xEsol . solutionE@@2DD;
yE2 = yEsol . solutionE@@2DD;
H* Select the correct position for E *L
If @ yE1 <= yD, xE = xE1 ; yE = yE1 , xE = xE2 ; yE = yE2 D ;
Print@"xE = ", xE, " m"D;
Print@"yE = ", yE, " m"D;
H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;

PI_3_17.nb

H********L
H*Link 3*L
H********L
f3 = ArcTan@HyB - yDL HxB - xDLD;
"f3=ArcTan@HyB-yDLHxB-xDLD"
Print@"f3 = ", f3, " rad = ", f3 * 180 N@PiD, " deg "D;
H* Graph of the mecanism *L
markers = Table @ 8 Point @ 8 xA , yA < D , Point @ 8 xB , yB < D , Point @ 8 xC , yC < D ,
Point @ 8 xD , yD < D, Point @ 8 xE , yE < D <D ;
name = Table @ 8 Text @ "A" , 80 , 0 <, 81 , 1 < D , Text @ "B" , 8xB , yB <, 8 0 , -1 < D ,
Text @ "C" , 8xC , yC <, 81, 1< D , Text @ "D" , 8xD , yD <, 8 1 , 1 < D,
Text @ "E" , 8xE , yE <, 81, 1< D <D ;
graph = Graphics @ 8
8 RGBColor @ 1 , 0 , 0 D , Line @ 8 8xA, yA<, 8xB, yB< < D < ,
8 RGBColor @ 1 , 0 , 1 D , Line @ 8 8xB, yB< , 8xE, yE<< D < ,
8 RGBColor @ 1 , 1 , 0 D , Line @ 8 8xB, yB< , 8xC, yC<< D <,
8 RGBColor @ 0 , 0 , 0 D , PointSize @ 0.02 D , markers < , 8 name < < D ;
Show @ Graphics @ graph D , PlotRange -> 8 8 -0.01 , 0.02< , 8 -0.045, 0.02 < < ,
Frame -> True, AxesOrigin -> 8xA, yA<, FrameLabel -> 8"x", "y"<,
Axes -> 8True, True<, AspectRatio -> Automatic D ;

xB = 0.01 m
yB = 0.0173205 m
xA = 0 mm
yA = 0 mm
xB = 0.01 mm
yB = 0.0173205 mm
xC = 0 mm
yC = -0.0316693 mm
xD = 0 mm
yD = -0.025 mm
xE = -0.00379757 m
yE = -0.0410715 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 1.36944 rad = 78.463 deg

f3=ArcTan@HyB-yDLHxB-xDLD
f3 = 1.33876 rad = 76.7053 deg

PI_3_17.nb

0.02
B

0.01

-0.01
y

-0.02

D
-0.03
C

-0.04
E
-0.005

0.005
x

0.01

0.015

0.02

PI_3_18.nb
H*Problem I .3 .18*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*L
AB = 150.;
BC = 300.;
BE = 600.;
CE = 850.;
CD = 330.;
EF = 1200.;
La = 350.;
Lb = 200.;
Lc = 100.;
phi = N@PiD * 120. 180;
H*Position of joint A*L
xA = yA = 0;
H*Postiton of joint D*L
xD = La;
yD = Lc;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
Print@"xB = ", xB, " mm"D;
Print@"yB = ", yB, " mm"D;
H*Position of joint C*L
eqnC1 = HxCsol - xBL^ 2 + HyCsol - yBL ^ 2 - BC ^ 2 0;
eqnC2 = HxCsol - xDL^ 2 + HyCsol - yDL ^ 2 - CD ^ 2 0;
solutionC = Solve@8eqnC1, eqnC2<, 8xCsol, yCsol<D;
H*Two solutions for C*L
xC1 = xCsol . solutionC@@1DD;
yC1 = yCsol . solutionC@@1DD;
xC2 = xCsol . solutionC@@2DD;
yC2 = yCsol . solutionC@@2DD;
H*Select the correct position for C*L
If@xB xC1, xC = xC1; yC = yC1, xC = xC2; yC = yC2D;
Print@"xC = ", xC, " mm"D;
Print@"yC = ", yC, " mm"D;
H*Position of joint E*L
eqnE1 = HxEsol - xCL^ 2 + HyEsol - yCL ^ 2 - CE ^ 2 0;
eqnE2 = HxEsol - xBL^ 2 + HyEsol - yBL ^ 2 - BE ^ 2 0;
solutionE = Solve@8eqnE1, eqnE2<, 8xEsol, yEsol<D;
H*Two solutions for E*L
xE1 = xEsol . solutionE@@1DD;
yE1 = yEsol . solutionE@@1DD;
xE2 = xEsol . solutionE@@2DD;
yE2 = yEsol . solutionE@@2DD;
H*Select the correct position for E*L
If@HyE1L yB, xE = xE1; yE = yE1, xE = xE2; yE = yE2D;
Print@"xE = ", xE, " mm"D;
Print@"yE = ", yE, " mm"D;

PI_3_18.nb

H*Pos of F*L
yF = Lc - Lb;
xF = xE + Sqrt@EF ^ 2 - HyF - yEL^ 2D;
Print@"xF = ", xF, " mm"D;
Print@"yF = ", yF, " mm"D;
H*Angle of Link 2*L
phi2 = ArcTan@HyB - yCL HxB - xCLD;
Print@"phi2 = ", phi2, " rad"D;
H*Angle of Link 3*L
phi3 = ArcTan@HyD - yCL HxD - xCLD;
Print@"phi3 = ", phi3, " rad"D;
H*Angle of Link 4*L
phi4 = ArcTan@HyF - yEL HxF - xELD;
Print@"phi4 = ", phi4, " rad"D;
H*Graph of the mechanism*L
markers = Table@8Point@8xA, yA<D, Point@8xB, yB<D,
Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D, Point@8xF, yF<D<D;
name = Table@8Text@"A", 81, 1<, 81, 0<D, Text@"B", 8xB, yB<, 80, -1<D,
Text@"C", 8xC, yC<, 80, -1<D, Text@"D", 8xD, yD<, 80, -1<D,
Text@"E", 8xE, yE<, 8-1, 1<D, Text@"F", 8xF, yF<, 80, -1<D<D;

graph = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<, 8RGBColor@0, 0, 1D,


Line@88xB, yB<, 8xC, yC<<D<, 8RGBColor@0, 0, 1D, Line@88xC, yC<, 8xE, yE<<D<,
8RGBColor@0, 0, 1D, Line@88xB, yB<, 8xE, yE<<D<,
8RGBColor@0, 1, 0D, Line@88xC, yC<, 8xD, yD<<D<, 8RGBColor@1, 0, 1D,
Line@88xE, yE<, 8xF, yF<<D<, 8RGBColor@0, 0, 0D, PointSize@0.02D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 8All, 8-150, 450<<, Frame True, AxesOrigin 8xA, yA<,
FrameLabel 8"x", "y"<, Axes 8True, True<, AspectRatio AutomaticD;
xB = -75. mm
yB = 129.904 mm
xC = 131.621 mm
yC = 347.408 mm
xE = -672.069 mm
yE = 70.672 mm
xF = 515.732 mm
yF = -100. mm
phi2 = 0.811052 rad
phi3 = -0.847639 rad
phi4 = -0.142711 rad

PI_3_18.nb

400

300
y

200

100
0

A
F

-100
-600

-400

-200

0
x

200

400

PI_3_19.nb

H*Problem I .3 .19*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*L
AB = .15;
AC = .22;
CD = .28;
DE = .2;
La = .23;
phi = Pi 3;
xA = 0;
yA = 0;
xC = -AC;
yC = 0;
xE = -HAC + LaL;
H*Position of joint B*L
xB = AB Cos@phiD;
yB = AB Sin@phiD;
H*Position of joint D*L
eqnD1 = HxDs - xCL ^ 2 + yDs^ 2 - CD ^ 2 0;
eqnD2 = HyDs - yCL HxDs - xCL HyB - yCL HxB - xCL;
solutionD = Solve@8eqnD1, eqnD2<, 8xDs, yDs<D;
H*Two solutions for D*L
xD1 = xDs . solutionD@@1DD;
yD1 = yDs . solutionD@@1DD;
xD2 = xDs . solutionD@@2DD;
yD2 = yDs . solutionD@@2DD;
If@yD1 0, xD = xD1; yD = yD1, xD = xD2; yD = yD2D;
H*Position of joint E*L
eqnE = HxE - xDL ^ 2 + HyD - yEsL ^ 2 - DE ^ 2 0;
solutionE = Solve@8eqnE<, 8yEs<D;
yE1 = yEs . solutionE@@1DD;
yE2 = yEs . solutionE@@2DD;
H*Select the correct position for yE*L
If@yE1 yE2, yE = yE1, yE = yE2D;
StylePrint@"f1
Print@"xB = ",
Print@"yB = ",
Print@"xD = ",
Print@"yD = ",
Print@"xE = ",
Print@"yE = ",

= f1
xB, "
yB, "
xD, "
yD, "
xE, "
yE, "

= 60", "Section"D;
m"D;
m"D;
m"D;
m"D;
m"D;
m"D;

H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"

PI_3_19.nb

Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H********L
H*Link 4*L
H********L
f4 = ArcTan@HyE - yDL HxE - xDLD;
"f4=ArcTan@HyE-yDLHxE-xDLD"
Print@"f4 = ", f4, " rad = ", f4 * 180 N@PiD, " deg "D;
Print@""D;
Print@""D;
H*Graph of the mecanism at f1=60 *L
markers = Table@
8Point@8xA, yA<D, Point@8xB, yB<D, Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D<D;
name = Table@8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D, Text@"C",
8xC, yC<, 8-1, -1<D, Text@"D", 8xD, yD<, 80, -1<D, Text@"E", 8xE, yE<, 8-1, 1<D<D;
graph = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xD, yD<<D<, 8RGBColor@0, 0, 1D,
Line@88xD, yD<, 8xE, yE<<D<, 8RGBColor@1, 1, 1D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 88-.7, .16<, 8-.2, .4<<, Frame True,
AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;

f1 = f1 = 60
xB = 0.075 m
yB = 0.129904 m
xD = -0.476255 m
yD = -0.112842 m
xE = -0.45 m
yE = 0.0854268 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 0.414802 rad = 23.7664 deg

f4=ArcTan@HyE-yDLHxE-xDLD
f4 = 1.43914 rad = 82.4567 deg

PI_3_19.nb

0.4
0.3
0.2
B
y 0.1
E
C

A
D

-0.1

-0.6

-0.4

-0.2
x

PI_3_20.nb

H*Problem I .3 .20*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*INPUT DATA*L
AB = 0.200;
AC = 0.060;
CD = 0.200;
DE = 0.500;
H*POSITION OF JOINT A*L
xA = yA = 0;
H*POSITION OF JOINT C*L
xC = AC;
yC = 0;
H*POSITION OF JOINT E*L
yE = 0;
phi = N@PiD 4;

H*POSITION OF JOINT B*L


xB = AB Cos@phiD; yB = AB Sin@phiD;
H*POSITION OF JOINT D*L
eqnD1 = HxDsol - xCL^ 2 + HyDsol - yCL ^ 2 - CD ^ 2 0;
eqnD2 = -HyB - yCL HxB - xCL HxDsol - xCL HyDsol - yCL;
solutionD = Solve@8eqnD1, eqnD2<, 8xDsol, yDsol<D;
H*TWO SOLUTIONS OF D*L
xD1 = xDsol . solutionD@@1DD;
yD1 = yDsol . solutionD@@1DD;
xD2 = xDsol . solutionD@@2DD;
yD2 = yDsol . solutionD@@2DD;
H*SELECT THE CORRECT POSITION OF D*L
If@xD1 xC, xD = xD1; yD = yD1, xD = xD2; yD = yD2D;
H*POSITION OF E*L
eqnE1 = HxEsol - xDL^ 2 + HyD ^ 2L - DE ^ 2 0;
SolutionE = Solve@8eqnE1<, 8xEsol<D;
H*TWO POSITION OF E*L
xE1 = xEsol . SolutionE@@1DD;
xE2 = xEsol . SolutionE@@2DD;
H*CORRECT POSITION OF E*L
If@xE1 xD, xE = xE1, xE = xE2D;
Print@"phi = ", phi,
Print@"xA = ", xA, "
Print@"yA = ", yA, "
Print@"xB = ", xB, "
Print@"yB = ", yB, "
Print@"xC = ", xC, "
Print@"yC = ", yC, "
Print@"xD = ", xD, "
Print@"yD = ", yD, "

" rad = ", phi 180 N@PiD, " deg"D;


m"D;
m"D;
m"D;
m"D;
m"D;
m"D;
m"D;
m"D;

PI_3_20.nb

Print@"xE = ", xE, " m"D;


Print@"yE = ", yE, " m"D;
H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;
H********L
H*Link 4*L
H********L
f4 = ArcTan@HyE - yDL HxE - xDLD;
"f4=ArcTan@HyE-yDLHxE-xDLD"
Print@"f4 = ", f4, " rad = ", f4 * 180 N@PiD, " deg "D;
Print@""D;
Print@""D;
H*GRAPH OF MECHANISM*Lmarkers = Table@
8Point@8xA, yA<D, Point@8xB, yB<D, Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D<D;
name = Table@8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D, Text@"C",
8xC, yC<, 8-2, -1<D, Text@"D", 8xD, yD<, 80, -1<D, Text@"E", 8xE, yE<, 8-1, 1<D<D;
graph@incrementD = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xC, yC<<D<, 8RGBColor@0, 1, 0D,
Line@88xC, yC<, 8xD, yD<<D<, 8RGBColor@0, 0, 1D, Line@88xD, yD<, 8xE, yE<<D<,
8RGBColor@1, 1, 1D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graph@incrementDD, PlotRange 88-0.05, 0.8<, 8-0.15, 0.2<<,
Frame True, AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;
phi = 0.785398 rad = 45. deg
xA = 0 m
yA = 0 m
xB = 0.141421 m
yB = 0.141421 m
xC = 0.06 m
yC = 0 m
xD = 0.233326 m
yD = -0.0997901 m
xE = 0.723267 m
yE = 0 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = 1.04841 rad = 60.0694 deg

PI_3_20.nb

f4=ArcTan@HyE-yDLHxE-xDLD
f4 = 0.200929 rad = 11.5124 deg

0.2
0.15
0.1
0.05
y
0
-0.05
-0.1

C
A

E
D

0.2

0.4
x

0.6

0.8

PI_3_21.nb
H*Problem I .3 .21*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*Linitdata = 8AB 0.12, AC 0.2, CD .38,
La .1, b .45 , Le .2, Lh .1, phi N@PiD * H30 180L<;
H*POSITION OF JOINT A*L
xA = yA = 0;
Print@"xA = ", xA, " m"D;
Print@"yA = ", yA, " m"D;

H*POSITION OF JOINT B*L


xB = AB Cos@ phi D;
yB = AB Sin@ phi D;
Print@"xB = ", xB, " = ", xB . initdata, " m"D;
Print@"yB = ", yB, " = ", yB . initdata, " m"D;
H*POSITION OF JOINT C*L
xC = 0;
yC = -AC;
Print@"xC = ", xC, " m"D;
Print@"yC = ", yC . initdata, " m"D;

H*Position of joint D*L


H*Parameters m and n of line BC:y=m x+b*L
mBC = HyB - yCL HxB - xCL;
bBC = yB - mBC xB;
eqn41 = HxDsol - xCL^ 2 + HyDsol - yCL ^ 2 - CD ^ 2 0;
eqn42 = yDsol - mBC xDsol - bBC 0;
solutionD = Solve@8eqn41, eqn42<, 8xDsol, yDsol<D;

H*Two solutions for D*L


xD1 = xDsol . solutionD@@1DD;
yD1 = yDsol . solutionD@@1DD;
xD2 = xDsol . solutionD@@2DD;
yD2 = yDsol . solutionD@@2DD;
H*Select the correct position for D*L
If@HyD1 . initdataL HyB . initdataL , xD = xD1; yD = yD1, xD = xD2; yD = yD2D;
Print@"xD = constant = ", xD . initdata, " m"D;
Print@"yD = ", yD . initdata, " m"D;
H*POSITION OF JOINT E*L
xE = Le;
yE = b;
Print@"xE = ", xE, " = ", xE . initdata, " m"D;
Print@"yE = ", yE, " = ", yE . initdata, " m"D;
H*POSITION OF JOINT F*L
xF = La;
yF = b;
Print@"xF = ", xF, " = ", xF . initdata, " m"D;
Print@"yF = ", yF, " = ", yF . initdata, " m"D;
H*POSITION OF JOINT G*L
xG = xD;

PI_3_21.nb

yG = b;
Print@"xG = ", xG . initdata, " m"D;
Print@"yG = constant = ", yG . initdata, " m"D;
H*POSITION OF H*L
xH = xD;
yH = Lh;
Print@"xH = ", xH . initdata, " m"D;
Print@"yH = ", yH . initdata, " m"D;

phi3 = ArcTan@mBCD;
Print@"phi3 = phi2 = ",
Hphi3 . initdataL 180 Pi, " deg = " , phi3 . initdata, " rad "D;
phi4 = N@PiD 2;
Print@"phi4= 90 deg = ", phi4 . initdata, " rad "D;
mEF = HyE - yFL HxE - xFL;
phi5 = ArcTan@mEFD;
Print@"phi5= ", phi5 . initdata, " rad "D;

H*Graph of the mecanism*L


markers = Table@8Point@8xA, yA<D,
Point@8xB . initdata, yB . initdata<D,
Point@8xC . initdata, yC . initdata<D,
Point@8xD . initdata, yD . initdata<D,
Point@8xE . initdata, yE . initdata<D,
Point@8xF . initdata, yF . initdata<D<D;
name = Table@8
Text@"A", 80, 0<, 8-1, 1<D,
Text@"B", 8xB . initdata, yB . initdata<, 80, -1<D,
Text@"C", 8xC, yC . initdata<, 8-1, -1<D,
Text@"D", 8xD . initdata, yD . initdata<, 80, -1<D,
Text@"E", 8xE . initdata, yE . initdata<, 8-1, 1<D,
Text@"F", 8xF . initdata, yF . initdata<, 8-1, -1<D,
Text@"G", 8xG . initdata, yG . initdata<, 80, -1<D,
Text@"H", 8xH . initdata, yH . initdata<, 8-1, 1<D<D;
graph = Graphics@
88RGBColor@1, 0, 0D,
Line@88xA, yA<, 8xB . initdata, yB . initdata<<D<,
8RGBColor@0, 1, 0D,
Line@88xC, yC . initdata<, 8xD . initdata, yD . initdata<<D<,
8RGBColor@0, 0, 1D,
Line@88xE . initdata, yE . initdata<, 8xF . initdata, yF . initdata<<D<,
8RGBColor@1, 0, 1D,
Line@88xG . initdata, yG . initdata<, 8xH . initdata, yH . initdata<<D<,
8RGBColor@1, 1, 1D,
PointSize@0.01D, markers<,
8name<<D;
Show@Graphics@graphD,
PlotRange 88-.1, .4<, 8-.25, .5<<,
Frame True,
AxesOrigin 8xA, yA<,
,

PI_3_21.nb

3
FrameLabel 8"x", "y"<,
Axes 8True, True<,
AspectRatio AutomaticD;

xA = 0 m
yA = 0 m
xB = AB Cos@phiD = 0.103923 m
yB = AB Sin@phiD = 0.06 m
xC = 0 m
yC = -0.2 m
xD = constant = 0.141038 m
yD = 0.152857 m
xE = Le = 0.2 m
yE = b = 0.45 m
xF = La = 0.1 m
yF = b = 0.45 m
xG = 0.141038 m
yG = constant = 0.45 m
xH = 0.141038 m
yH = 0.1 m
phi3 = phi2 = 68.2132 deg = 1.19055 rad
phi4= 90 deg = 1.5708 rad
phi5= 0 rad

PI_3_21.nb

0.5
F G
E
0.4

0.3

0.2
D
y
0.1
B
0

-0.1

-0.2

0.1

0.2
x

0.3

0.4

PI_3_22.nb

(*Problem I.3.22*)
Apply[Clear,Names["Global`*"]];
Off[General::spell];
Off[General::spell1];
(*
AB
AC
CD

Input data *)
= 0.16 ;
= 0.09 ;
= 0.16 ;

(* Input angle *)
phi = N[Pi]/6 ;
(* Position of joint A *)
xA = yA = 0;
(* Position of joint C *)
xC = 0 ;
yC = AC ;
(* Position of joint B *)
xB = AB Cos[phi] ;
yB = AB Sin[phi] ;
(* Position of joint D *)
(* Parameters m and n of line BC: y = m x + b *)
m = ( yB - yC ) / ( xB - xC ) ;
b = yB - m xB ;
eqnD1 = ( xDsol - xC )^2 + ( yDsol - yC )^2 - CD^2 == 0 ;
eqnD2 = yDsol - m xDsol - b == 0 ;
solutionD = Solve [ { eqnD1 , eqnD2 } , { xDsol , yDsol } ];
(* Two solutions for D *)
xD1 = xDsol /. solutionD[[1]];
yD1 = yDsol /. solutionD[[1]];
xD2 = xDsol /. solutionD[[2]];
yD2 = yDsol /. solutionD[[2]];
(* Select the correct position for D *)
If [ xD1 <= xC , xD = xD1 ; yD = yD1 , xD = xD2 ; yD=yD2 ] ;
(* Print the solutions for B and D *)
Print["xB = ",xB," m"];
Print["yB = ",yB," m"];
Print["xD = ",xD," m"];
Print["yD = ",yD," m"];
phi2=ArcTan[(yC-yB)/(xC-xB)];
Print["phi2 = ",(phi2) 180/Pi," deg"];
phi5=ArcTan[(yA-yD)/(xA-xD)];
Print["phi5 = ",(phi5) 180/Pi," deg"];
(* Graph of the mecanism
markers = Table [ {
Point [ { xA
Point [ { xB
Point [ { xC
Point [ { xD
} ] ;
name = Table [ {
Text [
Text [
Text [
Text [
} ] ;
graph = Graphics [

"A"
"B"
"C"
"D"

*)
,
,
,
,

,{0
,{xB
,{xC
,{xD

yA
yB
yC
yD

,
,
,
,

}
}
}
}

0
yB
yC
yD

] ,
] ,
] ,
]

},{-1 ,-1
},{ 0 ,-1
},{ -1,-1
},{ -1 ,2

}
}
}
}

] ,
] ,
] ,
]

markers = Table [
Point
Point
PI_3_22.nb
Point
Point
} ] ;
name = Table [ {
Text [
Text [
Text [
Text [
} ] ;

{
[
[
[
[

{
{
{
{

xA
xB
xC
xD

"A"
"B"
"C"
"D"

,
,
,
,

yA
yB
yC
yD

,{0
,{xB
,{xC
,{xD

,
,
,
,

}
}
}
}

0
yB
yC
yD

] ,
] ,
] ,
]

},{-1 ,-1
},{ 0 ,-1
},{ -1,-1
},{ -1 ,2

}
}
}
}

] ,
] ,
] ,
]

graph = Graphics [
{ { RGBColor [ 1 , 0 , 0 ] ,
Line [ { {xA,yA},{xB,yB} } ] } ,
{ RGBColor [ 0 , 1 , 0 ] ,
Line [ { {xB,yB} , {xD,yD}} ] } ,
{ RGBColor [ 0 , 0 , 1 ] ,
Line [ { {xD,yD}, {xA,yA}} ] } ,
{ RGBColor [ 0 , 0 , 0 ] ,
PointSize [ 0.015 ] , markers } ,
{ name } } ] ;
Show [ Graphics [ graph ] ,
PlotRange -> { All , All } ,
Frame -> True,
AxesOrigin -> {xA,yA},
FrameLabel -> {"x","y"},
Axes -> {True,True},
AspectRatio -> Automatic ] ;
xB = 0.138564 m
yB = 0.08 m
xD = -0.159585 m
yD = 0.101517 m
phi2 = -4.12781 deg
phi5 = -32.4617 deg
0.1
0.08

0.06
y
0.04
0.02
A

0
-0.15

-0.1

-0.05

0
x

0.05

0.1

PI_3_23.nb
H*Problem I .3 .23*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*L
AB = .100;
AC = .280;
BD = .470;
DE = .220;
La = .470;
f = N@PiD 6.;
Print@"phi = ", f, " rad = ", f * 180 N@PiD, " deg"D;
H*Position of joint A*L
xA = yA = 0;
Print@"xA = ", xA, " m"D;
Print@"yA = ", yA, " m"D;
H*Position of joint C*L
xC = AC;
yC = 0;
Print@"xC = ", xC, " m"D;
Print@"yC = ", yC, " m"D;
H*Position of joint B*L
xB = AB Cos@fD;
yB = AB Sin@fD;
Print@"xB = ", xB, " m"D;
Print@"yB = ", yB, " m"D;
phi2 = ArcTan@HyB - yCL HxB - xCLD;
Print@"phi2 = phi3 = ", phi2, " rad = ", Hphi2L * 180 N@PiD, " deg"D;
H*Position of joint D*L
eqnD1 = HxDs - xBL ^ 2 + HyDs - yBL ^ 2 - BD ^ 2 0;
eqnD2 = HyDs - yBL HxDs - xBL HyB - yCL HxB - xCL;
solutionD = Solve@8eqnD1, eqnD2<, 8xDs, yDs<D;
H*Two solutions for D*L
xD1 = xDs . solutionD@@1DD;
yD1 = yDs . solutionD@@1DD;
xD2 = xDs . solutionD@@2DD;
yD2 = yDs . solutionD@@2DD;
If@yD1 0, xD = xD1; yD = yD1, xD = xD2; yD = yD2D;
Print@"xD = ", xD, " m"D;
Print@"yD = ", yD, " m"D;
H*Position of joint E*L
xE = La;
yE = yD + HDE^ 2 - HxE - xDL ^ 2L ^ .5;
Print@"xE = ", xE, " m"D;
Print@"yE = ", yE, " m"D;
phi4 = ArcTan@HyD - yEL HxD - xELD;
Print@"phi4 = ", phi4, " rad = ", Hphi4L * 180 N@PiD, " deg"D;

PI_3_23.nb

H*Graph of the mecanism*L


markers = Table@
8Point@8xA, yA<D, Point@8xB, yB<D, Point@8xC, yC<D, Point@8xD, yD<D, Point@8xE, yE<D<D;
name = Table@
8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D, Text@"C", 8xC, yC<, 8-1, -1<D,
Text@"D", 8xD, yD<, 81, -1<D, Text@"E", 8xE, yE<, 8-2, 1<D<D;
graph = Graphics@88RGBColor@0, 0, 1D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 1, 0D, Line@88xB, yB<, 8xD, yD<<D<, 8RGBColor@1, 0, 0D,
Line@88xD, yD<, 8xE, yE<<D<, 8RGBColor@0, 0, 0D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 88-.12, .8<, 8-.1, .2<<,
Frame True, AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;
phi = 0.523599 rad = 30. deg
xA = 0 m
yA = 0 m
xC = 0.28 m
yC = 0 m
xB = 0.0866025 m
yB = 0.05 m
phi2 = phi3 = -0.252995 rad = -14.4956 deg
xD = 0.541641 m
yD = -0.0676434 m
xE = 0.47 m
yE = 0.140365 m
phi4 = -1.23911 rad = -70.9956 deg
0.2
0.15
0.1
y 0.05
0
-0.05

B
C
A
0

D
0.2

0.4
x

0.6

0.8

PI_3_24.nb

H*Problem I .3 .24*L
Apply@Clear, Names@"Global`*"DD;
Off@General::spellD;
Off@General::spell1D;
H*Input data*L
phi = 145 * N@PiD 180;
AB = 0.25;
AD = 0.70;
BC = 0.30;
a = 0.65;
H*Position of joint A*L
xA = yA = 0;
H*Position of joint D*L
xD = AD; yD = 0;
H*Position of joint C*L
yC = 0.25;
H*Position of joint B*L
xB = AB Cos@phiD; yB = AB Sin@phiD;
H*Position of joint C*L
m = HyD - yBL HxD - xBL;
b = yD - m xD;
eqn1 = HxB - xCsolL ^ 2 + HyB - yCsolL ^ 2 - BC^ 2 0;
eqn2 = m xCsol + b - yCsol 0;
sol = Solve@8eqn1, eqn2<, 8xCsol, yCsol<D;
xC1 = xCsol . sol@@1DD;
yC1 = yCsol . sol@@1DD;
xC2 = xCsol . sol@@2DD;
yC2 = yCsol . sol@@2DD;
If@xC1 xB, xC = xC1; yC = yC1, xC = xC2; yC = yC2D;
H*position for G*L
xG = -a; yG = yC;
Print@"phi = ", phi,
Print@"xB = ", xB, "
Print@"yB = ", yB, "
Print@"xC = ", xC, "
Print@"yC = ", yC, "
Print@"xD = ", xD, "
Print@"yD = ", yD, "
Print@"xG = ", xG, "
Print@"yG = ", yG, "

" rad = ", phi 180 N@PiD, " deg"D;


m"D;
m"D;
m"D;
m"D;
m"D;
m"D;
m"D;
m"D;

H********L
H*Link 2*L
H********L
f2 = ArcTan@HyB - yCL HxB - xCLD;
"f2=ArcTan@HyB-yCLHxB-xCLD"
Print@"f2 = ", f2, " rad = ", f2 * 180 N@PiD, " deg "D;

PI_3_24.nb

Print@""D;
Print@""D;

markers = Table@
8Point@8xA, yA<D, Point@8xB, yB<D, Point@8xC, yC<D, Point@8xD, yD<D, Point@8xG, yG<D<D;
name = Table@
8Text@"A", 80, 0<, 8-1, 1<D, Text@"B", 8xB, yB<, 80, -1<D, Text@"C", 8xC, yC<, 8-1, -1<D,
Text@"D", 8xD, yD<, 80, -1<D, Text@"G", 8xG, yG<, 8-1, 1<D<D;
graph = Graphics@88RGBColor@1, 0, 0D, Line@88xA, yA<, 8xB, yB<<D<,
8RGBColor@0, 0, 1D, Line@88xB, yB<, 8xC, yC<<D<, 8RGBColor@0, 0, 1D,
Line@88xB, yB<, 8xD, yD<<D<, 8RGBColor@1, 0, 1D, Line@88xC, yC<, 8xG, yG<<D<,
8RGBColor@1, 0, 0D, PointSize@0.01D, markers<, 8name<<D;
Show@Graphics@graphD, PlotRange 88-.8, .8<, 8-.5, .8<<,
Frame True, AxesOrigin 8xA, yA<, FrameLabel 8"x", "y"<,
Axes 8True, True<, AspectRatio AutomaticD;
phi = 2.53073 rad = 145. deg
xB = -0.204788 m
yB = 0.143394 m
xC = -0.50109 m
yC = 0.190353 m
xD = 0.7 m
yD = 0 m
xG = -0.65 m
yG = 0.190353 m

f2=ArcTan@HyB-yCLHxB-xCLD
f2 = -0.157176 rad = -9.00555 deg

PI_3_24.nb

0.8
0.6
0.4

0.2

C
G

B
D

-0.2
-0.4
-0.6 -0.4 -0.2

0
x

0.2

0.4

0.6

0.8