Advertisement
Matthen

Cube perspective

May 21st, 2016
1,209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. p[{x_, y_, z_}, t_] := (
  2. With[{p2 =
  3. RotationMatrix[
  4. 2 Pi t, {0, 0, 1}].RotationMatrix[-2 Pi t, {1, 1, 0}].{x, y,
  5. z}},
  6. p2[[;; 2]]/(p2[[3]] + 2 n + 2)
  7. ]
  8. );
  9. n = 5;
  10. frame[t_] := (Graphics[{
  11. (*PointSize[Medium],*)
  12. Point[
  13. Flatten[
  14. Table[
  15. p[{x, y, z}, t],
  16. {x, -n, n},
  17. {y, -n, n},
  18. {z, -n, n}],
  19. 2]
  20. ]
  21. }
  22. , PlotRange -> 1.2 {{-1, 1}, {-1, 1}}]);
  23. Manipulate[frame[t],
  24. {{t, 0.2}, 0, 1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement