Don't like ads? PRO users don't see any ads ;-)

Rotating Square Illusion

By: Matthen on Dec 21st, 2011  |  syntax: None  |  size: 0.39 KB  |  hits: 321  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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}]