W1 = 
        TranslateShape[Sphere[0.5], {0, 0, 0}];
W2 = 
        TranslateShape[Sphere[0.5], {1, 0, 0}];
W3 = 
        TranslateShape[Sphere[0.5], {2, 0, 0}];
W4 = 
        TranslateShape[Sphere[0.5], {3, 0, 0}];
W5 = 
        TranslateShape[Sphere[0.5], {0, 1, 0}];
W6 = 
        TranslateShape[Sphere[0.5], {0, 2, 0}];
W7 = 
        TranslateShape[Sphere[0.5], {1, 2, 0}];
W8 = 
        TranslateShape[Sphere[0.5], {2, 2, 0}];
W9 = 
        TranslateShape[Sphere[0.5], {3, 2, 0}];
W10 = 
        TranslateShape[Sphere[0.5], {0, 3, 0}];
W11 = 
        TranslateShape[Sphere[0.5], {0, 4, 0}];
W12 = 
        TranslateShape[Sphere[0.5], {1, 4, 0}];
W13 = 
        TranslateShape[Sphere[0.5], {2, 4, 0}];
W14 = 
        TranslateShape[
          Sphere[0.5], {3, 4, 
            0}];

W15 = 
        TranslateShape[Sphere[0.5], {6, 0, 0}];
W16 = 
        TranslateShape[Sphere[0.5], {10, 0, 0}];
W17 = 
        TranslateShape[Sphere[0.5], {6, 1, 0}];
W18 = 
        TranslateShape[Sphere[0.5], {7, 3, 0}];
W19 = 
        TranslateShape[Sphere[0.5], {10, 1, 0}];
W20 = 
        TranslateShape[Sphere[0.5], {6, 2, 0}];
W21 = 
        TranslateShape[Sphere[0.5], {8, 2, 0}];
W22 = 
        TranslateShape[Sphere[0.5], {10, 2, 0}];
W23 = 
        TranslateShape[Sphere[0.5], {6, 3, 0}];
W24 = 
        TranslateShape[Sphere[0.5], {9, 1, 0}];
W25 = 
        TranslateShape[Sphere[0.5], {10, 3, 0}];
W26 = 
        TranslateShape[Sphere[0.5], {6, 4, 0}];
W27 = 
        TranslateShape[
          Sphere[0.5], {10, 4, 
            0}];

W28 = 
        TranslateShape[Sphere[0.5], {13, 0, 0}];
W29 = 
        TranslateShape[Sphere[0.5], {14, 0, 0}];
W30 = 
        TranslateShape[Sphere[0.5], {15, 0, 0}];
W31 = 
        TranslateShape[Sphere[0.5], {13, 1, 0}];
W32 = 
        TranslateShape[Sphere[0.5], {16, 1, 0}];
W33 = 
        TranslateShape[Sphere[0.5], {13, 2, 0}];
W34 = 
        TranslateShape[Sphere[0.5], {16, 2, 0}];
W35 = 
        TranslateShape[Sphere[0.5], {13, 3, 0}];
W36 = 
        TranslateShape[Sphere[0.5], {16, 3, 0}];
W37 = 
        TranslateShape[Sphere[0.5], {13, 4, 0}];
W38 = 
        TranslateShape[Sphere[0.5], {14, 4, 0}];
W39 = 
        TranslateShape[
          Sphere[0.5], {15, 4, 
            0}];

Do[

b1x := 
          20 - t/Pi /; 
            0 ≤ t ≤ 7*Pi; 
b1x := 
          13 /; t > 7*Pi; 
b1y = 0; 
rt1 := 
          t /; 0 ≤ t ≤ 7*Pi; 
rt1 := 
          0 /; t > 7*Pi; 

b2x := 
          22 - t/Pi /; 
            0 ≤ t ≤ 8*Pi; 
b2x := 
          14 /; t > 8*Pi; 
b2y = 0; 
rt2 := 
          t /; 0 ≤ t ≤ 8*Pi; 
rt2 := 
          0 /; t > 8*Pi; 

b3x := 
          24 - t/Pi /; 
            0 ≤ t ≤ 9*Pi; 
b3x := 
          15 /; t > 9*Pi; 
b3y = 0; 
rt3 := 
          t /; 0 ≤ t ≤ 9*Pi; 
rt3 := 
          0 /; t > 9*Pi; 

W28 = 
          TranslateShape[
            RotateShape[Sphere[0.5], 0, -rt1, Pi/2], {b1x, b1y, 
              0}]; 
W29 = 
          TranslateShape[
            RotateShape[Sphere[0.5], 0, -rt2, Pi/2], {b2x, b2y, 
              0}]; 
W30 = 
          TranslateShape[
            RotateShape[Sphere[0.5], 0, -rt3, Pi/2], {b3x, b3y, 
              0}]; 

endw = 
          Show[Graphics3D[W1], Graphics3D[W2], Graphics3D[W3], 
            Graphics3D[W4], Graphics3D[W5], Graphics3D[W6], Graphics3D[W7], 
            Graphics3D[W8], Graphics3D[W9], Graphics3D[W10], Graphics3D[W11], 
            Graphics3D[W12], Graphics3D[W13], Graphics3D[W14], 
            Graphics3D[W15], Graphics3D[W16], Graphics3D[W17], 
            Graphics3D[W18], Graphics3D[W19], Graphics3D[W20], 
            Graphics3D[W21], Graphics3D[W22], Graphics3D[W23], 
            Graphics3D[W24], Graphics3D[W25], Graphics3D[W26], 
            Graphics3D[W27], Graphics3D[W28], Graphics3D[W29], 
            Graphics3D[W30], Graphics3D[W31], Graphics3D[W32], 
            Graphics3D[W33], Graphics3D[W34], Graphics3D[W35], 
            Graphics3D[W36], Graphics3D[W37], Graphics3D[W38], 
            Graphics3D[W39], Boxed -> False, Axes -> False, 
            ViewPoint -> {0.5, -1, 
                0.25}]; 
AppendTo[endgif, 
          endw];
, {t, 2*Pi, 9*Pi, 
          1/8*Pi}
];

Do[
vpx := 
          0.5 - tv /; 
            0 ≤ tv ≤ 0.5; 
vpx := 
          0 /; tv > 0.5; 
vpy := -1 + tv /; 
            0 ≤ tv ≤ 1; 
vpy := 
          0 /; tv > 1; 
vpz := 
          0.25 + 0.75*tv /; 
            0 ≤ tv ≤ 1; 
vpz := 
          1 /; tv > 1; 

camera = 
          Show[Graphics3D[W1], Graphics3D[W2], Graphics3D[W3], 
            Graphics3D[W4], Graphics3D[W5], Graphics3D[W6], Graphics3D[W7], 
            Graphics3D[W8], Graphics3D[W9], Graphics3D[W10], Graphics3D[W11], 
            Graphics3D[W12], Graphics3D[W13], Graphics3D[W14], 
            Graphics3D[W15], Graphics3D[W16], Graphics3D[W17], 
            Graphics3D[W18], Graphics3D[W19], Graphics3D[W20], 
            Graphics3D[W21], Graphics3D[W22], Graphics3D[W23], 
            Graphics3D[W24], Graphics3D[W25], Graphics3D[W26], 
            Graphics3D[W27], Graphics3D[W28], Graphics3D[W29], 
            Graphics3D[W30], Graphics3D[W31], Graphics3D[W32], 
            Graphics3D[W33], Graphics3D[W34], Graphics3D[W35], 
            Graphics3D[W36], Graphics3D[W37], Graphics3D[W38], 
            Graphics3D[W39], 
            PlotRange -> {{-1, 17}, {-1, 5}, {-1, 1}}, 
            Boxed -> False, Axes -> False, 
            ViewPoint -> {vpx, vpy, vpz}]; 
AppendTo[
          cameragif, camera];
, {tv, 0, 1.2, 
          0.05}
];