Animating Mathematics

GIFs aren’t just for cat videos

Clayton Shonkwiler

Colorado State University

/icerm

this talk!

GIFs? Really?

Really?

Yes, really

Spiral Light, by Dave Whyte (@beesandbombs)

Unoriented

Reveal

Reinvention

Coalesce

My First GIF

Geodesic

A to Z

Closure

Tiling

...?

Spherical Dodecahedron

a.k.a. pentagonal tiling of the sphere

+ Stereographic Projection

= Stereographic Dodecahedron

Rotation

...of what?

z \mapsto \frac{i (z+1)}{z-1}

The Hyperbolic Plane!

Source Code

inv[z_] := I (z + 1)/(z - 1);
circleinversion[z_] := z/Norm[z]^2;

HRot = ParallelTable[
     ParametricPlot[
      Flatten[{{10 (t - π), 0}, 
         {ToReal[inv[E^(I t) + #]], 
           ToReal[inv[
             circleinversion[E^(I t) + #]]]} & /@ (E^(I θ)*
           DeleteCases[
            Flatten[Table[a + I b, {a, -4, 4, 2}, {b, -4, 4, 2}]], 
            0 + 0 I])}], {t, 0, 2 π}, PlotRange -> 4, 
      Axes -> False, 
      PlotStyle -> 
       Directive[Thickness[.003], RGBColor[{227, 156, 188}/255]], 
      ImageSize -> {540, 540}, 
      Background -> GrayLevel[.2]], 
     {θ, 0., π/2 - #, #}] &[π/400];

Export[NotebookDirectory[] <> "HRot.gif", HRot, 
 "DisplayDurations" -> {1/36}]

And much more mathematics...

Schwarz–Christoffel Mapping

Langer & Singer's Trefoil

Brownian Bridges

Lawson Surface

The Klein Quartic

4-D Rotations

Roman Surface

Polytope Cross-Sections

Pentagon Tilings

How?

The Answer for Most People:

Processing

processing.org

+

ImageMagick / gifsicle

imagemagick.org / lcdf.org/gifsicle

Official @beesandbombs

GIF-making guide

The Answer for Me

Example

Backstory

Only certain pentagons tile the plane

But all quadrilaterals tile!

So I decided to build a quadrilateral tiler...

(requires free Wolfram CDF player)

Colors

Last Step: gifsicle

> gifsicle -O2 -k128 input.gif > output.gif

“optimize”

# colors

(≤256)

Download from lcdf.org/gifsicle/ or install from your favorite package manager

Thank you for listening!

Animating Mathematics

By Clayton Shonkwiler

Animating Mathematics

The animated GIF, which provided flashing lights and rotating "Under Construction" tackiness to the early web, has had an unlikely second life on social media. Aside from serving as a medium for sharing video while ducking the copyright cops, GIFs are embraced by a generation of abstract and geometric artists on Tumblr and elsewhere who have discovered beauty in short, looping animations. My first GIFs were created to sanity-check algorithms and I have since used them in both the classroom and the seminar room, but I also now create mathematical animations that are purely artistic. In this talk I will share some of my GIFs and the (trivial and non-trivial) mathematics behind them. My work is produced in Mathematica with help from a couple command-line tools, so I will also try to impart some hard-earned lessons on how to use this combination to produce GIFs that (probably) won't make you want to claw out your eyeballs.

  • 4,671