Swirl

Author

Eric W. Weisstein
January 27, 2011

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Graphics/Swirl.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Swirl.html.

©2010 Wolfram Research, Inc. except for portions noted otherwise

Examples

θ=ArcTan[x,y];
r=Sqrt[x^2+y^2];

L=4.Pi;
DensityPlot[(1+(Sin[x]-Cos[y]))/4,{x,-L,L},{y,-L,L},
Frame->False,Mesh->False,PlotPoints->200,
ColorFunction->Hue]

L=4.Pi;
DensityPlot[(Sin[x]-Cos[y])/8,{x,-L,L},{y,-L,L},
Frame->False,Mesh->False,PlotPoints->200]

With[{L=4},
Show[GraphicsArray[Partition[Table[
DensityPlot[Sin[6Cos[r]-n θ ],{x,-L,L},{y,-L,L},
DisplayFunction->Identity,
Frame->False,Mesh->False,PlotPoints->150],{n,0,5}],3]]
]]//Timing

With[{L=4},
Show[GraphicsArray[Partition[Table[
DensityPlot[Sin[6Cos[r]-n θ ],{x,-L,L},{y,-L,L},
DisplayFunction->Identity,ColorFunction->(Hue[2#]&),
Frame->False,Mesh->False,PlotPoints->150],{n,0,5}],3]],
ImageSize->500
]
]//Timing

With[{L=4},
Show[GraphicsArray[Partition[Table[
DensityPlot[Sin[6Cos[r]-n θ ],{x,-L,L},{y,-L,L},
DisplayFunction->Identity,ColorFunction->(Hue[(#+1)/2]&),
Frame->False,Mesh->False,PlotPoints->150],{n,0,5}],3]],
ImageSize->500
]
]//Timing

With[{L=20},
Show[GraphicsArray[Partition[Table[
DensityPlot[Cos[n θ]-Sin[r ],{x,-L,L},{y,-L,L},
DisplayFunction->Identity,
Frame->False,Mesh->False,PlotPoints->150],{n,0,5}],3]]
]
]//Timing

L=20.;
Show[GraphicsArray[Partition[Table[
DensityPlot[Cos[n θ]-Sin[r],{x,-L,L},{y,-L,L},
DisplayFunction->Identity,ColorFunction->Hue,
Frame->False,Mesh->False,PlotPoints->150],{n,0,5}],3]],
DisplayFunction->$DisplayFunction]//Timing

L=4.;
Show[GraphicsArray[Partition[Table[
				DensityPlot[Cos[n θ]-Tan[r Sin[2r] ],{x,-L,L},{y,-L,L},
					DisplayFunction->Identity,
	Frame->False,Mesh->False,PlotPoints->150],{n,0,4}],2]],
DisplayFunction->$DisplayFunction]

V6

Block[{L=4,θ=ArcTan[x,y],r=Sqrt[x^2+y^2]},
GraphicsGrid[Partition[Table[DensityPlot[Sin[6Cos[r]-n θ ],{x,-L,L},{y,-L,L},Frame->False,ColorFunction->GrayLevel,MaxRecursion->3,Mesh->False],{n,0,5}],3]]
]