Two fixed ends
This activity belongs to the GeoGebra book Linkages.
We have already seen in the Watt's Linkage the use of scripts for a chain of 3 bars with both ends fixed. Here we detail the scripts corresponding to a chain of four bars with both ends fixed. Note that point C can only reach any position in the shaded region.
We can see that the scripts become more and more complicated, due to the greater limitation of movement imposed by the fixed points. Now, when moving a point, the "transmission wave" must bounce off both ends. However, there may be shortcuts. For example, in this case of 4 bars, we can take advantage of the fact that the position of the central point determines (except isomer) the position of B and D.
This is the most difficult case to simulate in the plane. Adding more fixed points does not, in essence, make it more difficult, since if a chain has more than two fixed points it can be divided into independent sub-strings. Closing the chain (placing E at a unit distance from A) does not add more difficulty either.
Now, the more bar circuits (whether open or closed) we place between the two fixed extremes, the greater the number of intermediate steps that the transmission wave (and its possible ramifications) must travel before bouncing off each extreme, which will increase the number of instructions in the scripts.
The scripts we have used are detailed below.
When moving B:
SetValue(B, Intersect(Ray(A,B), Circle(A,1)))
SetValue(C, Intersect(Ray(B,C), Circle(B,1)))
SetValue(D, Intersect(Ray(C,D), Circle(C,1)))
SetValue(D, Intersect(Ray(E,D), Circle(E,1)))
SetValue(C, Intersect(Ray(D,C), Circle(D,1)))
SetValue(B, ClosestPoint({Intersect(Circle(A,1), Circle(C,1))}, B))
When moving C (we've called "bor" to the border of the shaded region "reg"):
SetValue(C, Si(C∈reg, C, ClosestPoint(bor, C)))
SetValue(B, ClosestPoint({Intersect(Circle(A,1), Circle(C,1))}, B))
SetValue(D, ClosestPoint({Intersect(Circle(E,1), Circle(C,1))}, D))
When moving D:
SetValue(D, Intersect(Ray(E,D), Circle(E,1)))
SetValue(C, Intersect(Ray(D,C), Circle(D,1)))
SetValue(B, Intersect(Ray(C,B), Circle(C,1)))
SetValue(B, Intersect(Ray(A,B), Circle(A,1)))
SetValue(C, Intersect(Ray(B,C), Circle(B,1)))
SetValue(D, ClosestPoint({Intersect(Circle(E,1), Circle(C,1))}, D))
Author of the construction of GeoGebra: Rafael Losada