SHARE
TWEET

Pendulum Waves

Matthen May 5th, 2015 542 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. i0 = 3; i1 = 9;
  2. frame[t_] := Graphics[
  3.    Table[
  4.     {
  5.      Opacity[0.9],
  6.      With[{a = 0.3 + 0.1 (i - i0)/(i1 - i0)},
  7.       With[{p = {Sin[a Cos[2 Pi i t]], -Cos[a Cos[2 Pi i t]] }/
  8.           Sqrt[i], c = ColorData["DarkRainbow"][(i - i0)/(i1 - i0)]},
  9.        {
  10.         Darker@c,
  11.         Line[{{0, 0}, p}],
  12.         c,
  13.         Disk[p, 0.008]}
  14.        ]
  15.       ]
  16.      }
  17.     , {i, i0, i1, 0.5}]
  18.    , PlotRange -> {0.3 {-1, 1}, {-0.7, 0.05}}];
  19. Manipulate[frame[t],{t,0,2}]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top