Matthen

Infinite Series Visual Proof

Jun 4th, 2011
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. midpoints =
  2. NestList[Mean[{{0, 0}, {1, 0}, #}] &, {1/2, Sqrt[3]/2}, 10];
  3. iter[n_] :=
  4. Graphics[Join[{White, EdgeForm[Black]},
  5. Table[
  6. {Polygon[{{0, 0}, {1, 0}, midpoints[[i]]}],
  7. Polygon[{midpoints[[i]], midpoints[[i - 1]], {1, 0}}],
  8. Red,
  9. Polygon[{midpoints[[i]], midpoints[[i - 1]], {0, 0}}]}
  10. , {i, 2, n}]
  11. ]];
  12. iter[1] =
  13. Graphics[{White, EdgeForm[Black],
  14. Polygon[{{0, 0}, {1, 0}, {1/2, Sqrt[3]/2}}]}];
  15. Manipulate[iter[n], {n, 1, 10, 1}]
Advertisement
Add Comment
Please, Sign In to add comment