Message Boards Message Boards

[GIF] Wrap: wrapping lines around a circle

MODERATOR NOTE: a submission to computations art contest, see more: https://wolfr.am/CompArt-22


Wrapping lines around a circle

Wrap

This started as a visualization of the exponential map, which for the circle corresponds to the map $t \mapsto e^{i t}$, where it's useful to visualize the real line (where $t$ lives) as being the vertical line $\Re(z)=1$ (i.e., parallel to the imaginary axis) which is tangent to the unit circle at the point $z=1$.

To wrap the line around the circle I defined the following function, which is just a straight line outside the interval $[-s,s]$, and sends $t$ to $e^{it}$ for $t$ in the interval:

wrap[s_, t_] := 
  Which[t < -s, E^(-I s) + I E^(-I s) (t + s), -s <= t <= s, E^(I t), 
   t > s, E^(I s) + I E^(I s) (t - s)];

With the help of the smootherstep function

smootherstep[t_] := 6 t^5 - 15 t^4 + 10 t^3;

and some rotation, we get the first half of the animation:

DynamicModule[{u, cols = RGBColor /@ {"#ffa323", "#ff6337", "#004a2f"}},
 Manipulate[
  u = \[Pi] smootherstep[s];
  Show[
   Table[
    ParametricPlot[
     ReIm[-I E^(I u) r wrap[u, t]], {t, -\[Pi], \[Pi]},
     PlotRange -> 2.5, 
     PlotStyle -> 
      Directive[Thickness[.01], Blend[cols, 2/3 r], CapForm["Round"], JoinForm[None]]],
    {r, 0, 1.5, .1}],
   Axes -> False, ImageSize -> 540, Background -> cols[[-1]]],
  {s, 0, 1}]
 ]

And the second half:

DynamicModule[{u, cols = RGBColor /@ {"#ffa323", "#ff6337", "#004a2f"}},
 Manipulate[
  u = \[Pi] smootherstep[s];
  Show[
   Table[
    ParametricPlot[
     ReIm[Conjugate[I E^(I u)  r wrap[u, t]]], {t, -\[Pi], \[Pi]},
     PlotRange -> 2.5, 
     PlotStyle -> 
      Directive[Thickness[.01], Blend[cols, 2/3 r], CapForm["Round"], JoinForm[None]]],
    {r, 0, 1.5, .1}],
   Axes -> False, ImageSize -> 540, Background -> cols[[-1]]],
  {s, 1, 0}]
 ]
4 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD

good question, is there any copyright on the GIF or the code, or could just anybody take this and use it for reposting and commercialization, without even giving credit?

POSTED BY: Raspi Rascal

Yes, the GIF is copyrighted (and, like all my work, made available under a Creative Commons BY–NC–ND license).

The code is probably not copyrighted, and (in my opinion) shouldn't be even if it technically is.

I don't know about the legality of using the code to recreate the GIF for the purposes of bypassing the copyright on the GIF.

Of course, practically speaking you could almost certainly do this. It's fairly unlikely you'd do anything that I'd care about, and even less likely I'd have the resources to stop you even if I did.

Congratulations! Your post was highlighted on the Wolfram's official social media channels. Thank you for your contribution. We are looking forward to your future posts.

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract