Advertisement
Matthen

Ruler Scaling

Jan 12th, 2012
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. n = 10;
  2. corners = {{0, 0, 0}, {0, 10, 10}, {1, 0, 0}, {1, 10, 1}};
  3. f = Interpolation[corners, InterpolationOrder -> 1];
  4. frame[t_] := Quiet@Graphics[{
  5. ColorData["DarkRainbow"][1],
  6. Line[{{0, 0}, {0, 1}}],
  7. Table[{ColorData["DarkRainbow"][0.3^(s + t)], Table[
  8. If[f[t, i/10^s] <= 1,
  9. Line[{{f[t, i/10^s], 0}, {f[t, i/10^s], 0.3^(s + t)}}], {}]
  10. , {i, (n + 1) 10^s}]}, {s, 0, 3}]
  11. }, PlotRange -> {{0, 1 + 0.01}, {0, 1}}, AspectRatio -> 1/3,
  12. ImageSize -> 300];
  13. Manipulate[frame[t], {t, 0, 1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement