Created
March 27, 2023 18:53
-
-
Save shonkwiler/d11f7a21a1614eb8d068a0d4696f53ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Source code for ⌗ by Clayton Shonkwiler, available at https://shonk.tumblr.com/post/706176450189049856 *) | |
flow = Block[{r = 10, t, cols = RGBColor /@ {"#BC002D", "#FFFFFF"}}, | |
ParallelTable[ | |
t = 4 Tan[s]; | |
Show[ | |
ContourPlot[ | |
Im[(t + x + I y) + 1/(t + x + I y)], {x, -r, r}, {y, -r, r}, | |
Contours -> Table[i, {i, -3.45, 3.45, .3}], | |
ContourShading -> None, | |
RegionFunction -> ((#1 + t)^2 + #2^2 > 1 &), | |
ContourStyle -> Directive[Thickness[.004], cols[[1]]], | |
ImageSize -> 270, Frame -> False, PlotRangePadding -> None, | |
PlotPoints -> 200], | |
ContourPlot[ | |
Re[(t + x + I y) + 1/(t + x + I y)], {x, -r, r}, {y, -r, r}, | |
Contours -> Table[i, {i, t - 3.9, t + 3.9, .3}], | |
RegionFunction -> ((#1 + t)^2 + #2^2 > 1 &), | |
ContourStyle -> Directive[Thickness[.004], cols[[1]]], | |
ContourShading -> None, PlotPoints -> 200], | |
Graphics[{cols[[1]], Disk[{-t, 0}, 1]}], PlotRange -> 3, | |
Background -> cols[[2]]], | |
{s, -\[Pi]/2 + .001, \[Pi]/2 - .001, (\[Pi] - .002)/150}] | |
]; | |
Export[NotebookDirectory[] <> "flow.gif", flow, | |
"AnimationRepetitions" -> Infinity, "DisplayDurations" -> 1/50]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment