Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- frame[\[Theta]_] := Graphics3D[{
- FaceForm[], EdgeForm[Directive[Thickness[0.05], Red]],
- Cuboid[{0, 0, 0}, {1, 1, 1}]
- }, Boxed -> False, ImageSize -> {200/6, 200}, AspectRatio -> 6,
- ViewPoint -> {10 Sin[\[Theta]], 10 Cos[\[Theta]], 6.2}];
- anim = Table[frame[\[Theta]], {\[Theta], 0, Pi/2, Pi/12}];
- animData = Map[ImageData[Rasterize[#]] &, anim];
- n = Length[animData];
- h = Length[animData[[1]]];
- w = Length[animData[[1]][[1]]];
- interlacedImage =
- Image[Table[
- Flatten[Table[animData[[i]][[j]][[k]], {k, w}, {i, n}], 1], {j,
- h}]];
- frame2[t_] :=
- Graphics[{
- Inset[interlacedImage, {0, 0}, {Left, Bottom}, {n w, 300}],
- FaceForm[Black], EdgeForm[],
- Table[Rectangle[{i + t,
- 0 + 300 Min[0, t] + 300 Min[0, 7 - t]}, {i + 6 + t,
- 300 + 300 Min[0, t] + 300 Min[0, 7 - t]}], {i, 0, w n , 7}]
- }, ImageSize -> 1.5 {n w, h}, PlotRange -> {{0, n w}, {0, h}}];
- Manipulate[frame2[t], {t, -1, 8}]
Advertisement
Add Comment
Please, Sign In to add comment