Advertisement
Matthen

Rotating Square Illusion

Dec 21st, 2011
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. colors = ColorData["DarkRainbow"] /@ RandomReal[{0, 1}, 10];
  2. Manipulate[
  3. Show[Reverse@
  4. Table[RegionPlot[((xt^4 + yt^4) /. {xt ->
  5. x Cos[\[Theta]] - y Sin[\[Theta]],
  6. yt -> y Cos[\[Theta]] + x Sin[\[Theta]]}) < r^4, {x, -2,
  7. 2}, {y, -2, 2}, Frame -> None, PlotStyle -> colors[[10 r]],
  8. PlotRange -> Sqrt[2]], {r, 0, 1, 0.1}]
  9. ],
  10.  
  11. {\[Theta], 0, 2 Pi}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement