File:Hairy ball.gif

Summary

Description
English: A simplified (but easy to understand) version of the hairy ball theorem tells us that, if you try to lie flat the hair on a sphere, you will get some defect somewhere, no matter what.
Date
Source https://twitter.com/j_bertolotti/status/1293561744107986944
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 12.1 code

sinstep[t_] := Sin[\[Pi]/2 t]^2
R = 5; n = 800;
points = R*SpherePoints[n];
field[{x_, y_, z_}] := (1 - sinstep[t]) {x, y, z}/Norm[{x, y, z}] + 
  sinstep[t] {y, -x, 0}/Norm[{y, -x, 0}]
p0 = Table[
   Graphics3D[{
     Orange, Opacity[0.8], Sphere[{0, 0, 0}, R], Opacity[1], Black, Point[points], Thick, Purple,
     Table[
      Line[{points[[j]], points[[j]] + field[points[[j]] ]}]
      , {j, 1, n}]
     }, Boxed -> False, Lighting -> "Neutral", Background -> Black, 
    PlotRange -> 1.2*R*{{-1, 1}, {-1, 1}, {-1, 1}}]
   , {t, 0, 1, 0.025}];
t = 1;
defect1 = Graphics3D[{
   Orange, Opacity[0.8], Sphere[{0, 0, 0}, R], Opacity[1], Black, Point[points], Thick, Purple,
   Table[
    Line[{points[[j]], points[[j]] + field[points[[j]] ]}]
    , {j, 1, n}]
   , Red, Sphere[{0, 0, R}, 0.5], , Sphere[{0, 0, -R}, 0.5]
   }, Boxed -> False, Lighting -> "Neutral", Background -> Black, 
  PlotRange -> 1.2*R*{{-1, 1}, {-1, 1}, {-1, 1}}]
t =.;
field[{x_, y_, z_}] := {0, 1, 0}/Norm[{0, 1, 0}];
norm[{x_, y_, z_}] := {x, y, z}/Norm[{x, y, z}];
fnorm[{x_, y_, z_}] := (field[{x, y, z}].norm[{x, y, z}]) norm[{x, y, z}];
ftang[{x_, y_, z_}] := (field[{x, y, z}] - fnorm[{x, y, z}])/Norm[field[{x, y, z}] - fnorm[{x, y, z}]];
field2[{x_, y_, z_}] := (1 - sinstep[t]) {x, y, z}/Norm[{x, y, z}] + sinstep[t] ftang[{x, y, z}];
p1 = Table[
   Graphics3D[{
     Orange, Opacity[0.8], Sphere[{0, 0, 0}, R], Opacity[1], Black, Point[points], Thick, Purple,
     Table[
      Line[{points[[j]], points[[j]] + field2[points[[j]] ]}]
      , {j, 1, n}]
     }, Boxed -> False, Lighting -> "Neutral", Background -> Black, 
    PlotRange -> 1.2*R*{{-1, 1}, {-1, 1}, {-1, 1}}]
   , {t, 0, 1, 0.025}];
t = 1;
defect2 = Graphics3D[{
   Orange, Opacity[0.8], Sphere[{0, 0, 0}, R], Opacity[1], Black, Point[points], Thick, Purple,
   Table[
    Line[{points[[j]], points[[j]] + field2[points[[j]] ]}]
    , {j, 1, n}]
   , Red, Sphere[{0, R, 0}, 0.5], , Sphere[{0, -R, 0}, 0.5]
   }, Boxed -> False, Lighting -> "Neutral", Background -> Black, 
  PlotRange -> 1.2*R*{{-1, 1}, {-1, 1}, {-1, 1}}]
t =.;
ListAnimate[
Join[p0, Table[defect1, {5}], Table[p0[[-1]], {5}], Table[defect1, {5}], Table[p0[[-1]], {5}], Table[defect1, {5}], Table[p0[[-1]], {5}], Reverse[p0],
 p1, Table[defect2, {5}], Table[p1[[-1]], {5}], Table[defect2, {5}], Table[p1[[-1]], {5}], Table[defect2, {5}], Table[p1[[-1]], {5}], Reverse[p1] ] 
]

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Hairy%20ball.gif
Category:Self-published work Category:Animated GIF files Category:Algebraic topology Category:Hairy ball theorem Category:Images with Mathematica source code
Category:Algebraic topology Category:Animated GIF files Category:CC-Zero Category:Hairy ball theorem Category:Images with Mathematica source code Category:Pages using deprecated source tags Category:Self-published work