# Four-bar free chain (3D)

This activity belongs to the GeoGebra book Linkages. The move from planar to 3D linkages is simple. Here we see the 3D version of the chain of 5 points and 4 bars that we had already seen in its planar version. We can observe that it has been enough to replace in the scripts the circles in charge of adjusting the distances by spheres of radius unit.
The scripts used are detailed below. When moving A: SetValue(B, Intersect(Ray(A,B), Sphere(A,1))) SetValue(C, Intersect(Ray(B,C), Sphere(B,1))) SetValue(D, Intersect(Ray(C,D), Sphere(C,1))) SetValue(E, Intersect(Ray(D,E), Sphere(D,1))) When moving B: SetValue(A, Intersect(Ray(B,A), Sphere(B,1))) SetValue(C, Intersect(Ray(B,C), Sphere(B,1))) SetValue(D, Intersect(Ray(C,D), Sphere(C,1))) SetValue(E, Intersect(Ray(D,E), Sphere(D,1))) When moving C: SetValue(B, Intersect(Ray(C,B), Sphere(C,1))) SetValue(D, Intersect(Ray(C,D), Sphere(C,1))) SetValue(A, Intersect(Ray(B,A), Sphere(B,1))) SetValue(E, Intersect(Ray(D,E), Sphere(D,1))) When moving D: SetValue(E, Intersect(Ray(D,E), Esfera(D,1))) SetValue(C, Intersect(Ray(D,C), Esfera(D,1))) SetValue(B, Intersect(Ray(C,B), Esfera(C,1))) SetValue(A, Intersect(Ray(B,A), Esfera(B,1))) When moving E: SetValue(D, Intersect(Ray(E,D), Sphere(E,1))) SetValue(C, Intersect(Ray(D,C), Sphere(D,1))) SetValue(B, Intersect(Ray(C,B), Sphere(C,1))) SetValue(A, Intersect(Ray(B,A), Sphere(B,1)))
Author of the construction of GeoGebra: Rafael Losada