Avatar

archery

@intothecontinuum / intothecontinuum.tumblr.com

a perspective on mathematics, the pattern, and the abstract

MA = ImageCrop[Import["marina.jpg"],1300]; MAc = ImageData[MA, "Byte"]; MAg = ImageData[ColorConvert[MA, "GrayLevel"], "Byte"]; waves[x_, y_, w_, a_, t_] := Sin[w ((Cos[a] + Sin[a]) x + (Sin[a] - Cos[a]) y) + t*2 Pi] Manipulate[ Graphics[  Table[   Translate[   {RGBColor[MAc[[y, x]]/255], Opacity[.8],    Disk[{x, -y}, (.7 + 5 (1 - MAg[[y, x]]/255))*3 (1 +         Sum[waves[x, y, .07, a* 2 Pi/5, t], {a, 0, 4, 1}]/(210))]},         3*{Cos[2 Pi*(t + x/1300 + y/1300)],     Sin[2 Pi*(t + x/1300 + y/1300)]}],  {x,1,1300,15}, {y,1,1300,15}], PlotRange -> {{-15, 1315}, {15, -1315}}, ImageSize -> 500], {t,0,.95,.05}]

Thank you MAI + t for hosting intothecontinuum!

Animated GIFs (700 x 700) Mathematica code:

Dashboard[z_] := RGBColor[54/255, 70/255, 93/255, z]; BG = Raster[       Table[.005 ((i - 500)^2 + (j - 500)^2),       {i,1000}, {j,1000}],     {Scaled[{0, 0}], Scaled[{1, 1}]}, {1, 1000},     ColorFunction -> Dashboard]; P = {{5, 8, 10}, {4.5, 12, 7}, {3, 16, 10}}; Manipulate[With[{h=P[[k,1]], u=P[[k,2]], s=P[[k,3]]}, Graphics[  Table[   {AbsoluteThickness[h],    RGBColor[54/255, 70/255, 93/255],     Circle[      {s*Cos[i*2 Pi/u], s*Sin[i*2 Pi/u]},       t + (100 - n) (1 + Sign[100 - n])/2]},  {n, 0, 100, 1}, {i, 0, u - 1, 1}], PlotRange -> {{-16, 16},{-16, 16}}, ImageSize -> 700, Prolog -> BG]], {k,1,3,1}, {t, 0, 1}]

Algorithmically generated using circles subjected to constrained randomness

Animated GIFs (600x600)

RR[n_, m_] := (SeedRandom[n*m]; RandomReal[]) L[t_, Q_, g_, i_] := Sum[ Exp[-(t - (RR[i, 5*Q] + j))^2/g], {j, {-1, 0, 1}}] G[c_, F_, P_, s_, o_, g_, A_, a_, w_, t_, r_, Q_, pr_, is_] := Graphics[  Table[   Table[    {RGBColor[RR[i, Q], RR[i, 2*Q], RR[i, 3*Q], o + A*L[t, 5*Q, g, i]],     Disk[      RotationTransform[(k + (-1)^(i*w)*t*a)*2 Pi/F]       [{r*RR[2 i, 4*Q], r*RR[2 i + 1, 4*Q]}], s*L[t, 5*Q, g, i]]},   {k, 0, F - 1, 1}],  {i, 1, P, 1}], PlotRange -> pr, ImageSize -> is,  Background -> c]   Manipulate[[   G[RGBColor[54/255, 70/255, 93/255], 12, 50, .2, 0, .1, .25, 1, 1, t, 1, Q, 1.6, 600],  {Q, {41, 72, 1, 76}}, {t, 0, .96, .04}],

Manipulate[ Graphics[  Table[{RGBColor[54/255,70/255,93/255],    Disk[{x,y}, .55*(1 + Sum[          Sin[(Cos[a*2Pi/11] + Sin[a*2Pi/11])x + (Sin[a*2Pi/11] - Cos[a*2Pi/11])y + t*2Pi], {a,0,10,1}]/22)]}, {x,-25,25,1}, {y,-35,35,1}], PlotRange -> {{-25, 25}, 7/5*{-25, 25}}, ImageSize -> {500, 700}], {t, 0, 1}]

A[N_, t_] := Graphics[   Table[    Rotate[     Table[     {GrayLevel[Abs[j - 1]], EdgeForm[GrayLevel[1]],      Disk[{0, 0}, N - n + j, {Pi, 0}]},     {j, 1, 0, -1}],    Pi*(N - n + 1) (1 + Sin[t*Pi - Pi/2]), {0, 0}],   {n, 0, N, 1}], PlotRange -> N + 1.5, ImageSize -> 500] Manipulate[A[15,t],{t,0,1}]

Making use of the golden angle.

d[x_, y_, r_, c_, s_, F_, n_] := {Disk[    RotationTransform[n*2.4][{x*c^n, y}], r*c^n],  Table[   {White,    Disk[     RotationTransform[k*2 Pi/F, RotationTransform[n*2.4][{x*c^n, y}]]     [RotationTransform[n*2.4][{x*c^n, y}] + c^n {r - s, 0}], s*c^n]},  {k, 0, F - 1, 1}]} Manipulate[ ImageCrop[  Graphics[   Table[     d[3, 0, 1 - .1*Sin[t + n*Pi/110]^2, 1.025, .03, 24, n],   {n, 0, 110, 1}],  PlotRange -> 30, Background -> Black, ImageSize -> 700], {500, 700}], {t, 0, 39 Pi/40, Pi/40}] Manipulate[[ ImageCrop[  Graphics[   Table[     d[3, 0, 1 - .1*Sin[t*3 Pi/40 + n*2 Pi/110]^2, 1.025, .03, 24, n],   {n, If[t < 66 , 0, 2 (t - 65)], If[t < 56, 2 t, 110], 1}],  PlotRange -> 30, Background -> Black, ImageSize -> 700], {500, 700}], {t, 0, 120, 1}]

firing up the processors again for MAI + t: maihudson.tumblr.com/Collaborators

Erwin :=  ImageData[Rasterize[ImageResize[ColorConvert[ Import["ErwinsFace.jpg"],   "GrayLevel"], 100], RasterSize -> 64], "Byte"]; waves[x_, y_, w_, a_, t_] := Sin[w((Cos[a] + Sin[a])x + (Sin[a] - Cos[a])y) + t*2Pi] Manipulate[ Graphics[ Table[   Translate[   Disk[{x,-y}, (.1+.4(1-Part[Erwin,y+1,x+1,1]/255))*3(1+Sum[waves[x,y,.2,a*2 Pi/5,t], {a,0,4,1}]/10)], .7*{Cos[2Pi*(t+x/90+y/90)], Sin[2Pi*(t+x/90+y/90)]}], {x,0,90,2}, {y,0,90,2}], PlotRange -> {{-3,93},{3,-93}}, ImageSize -> 500], {t,0,1}]

W[x_,y_,w_,a_,t_]:= w((Cos[a] + Sin[a])x + (Sin[a] - Cos[a])y) + t*2Pi Manipulate[ Graphics[  Table[   {White, Disk[     {x,y} + .2{Cos[W[x,y,.6,.5Pi,t]], Sin[W[x,y,.6,.5Pi,t]]}, .35]},  {x,-10,10}, {y,-14,14}], ImageSize -> {500,700}, Background -> RGBColor[53/255,70/255,94/255], PlotRange -> {{-11,11},{-15,15}}], {t,0,1}]

 Dearest Followers, 

I have been invited to curate the Marina Abramovic Institute’s tumblr over @  maihudson during this month of May. We will be exploring themes similar to what we have experienced here at intothecontinuum. For all you fellow creative coders out there, your submissions are more than welcome! Follow along and keep your eyes out!

In last weeks post, we saw how the motion of particles that move along straight lines creates the illusion of a spinning circle. This time we actually let the individual particles move in circular paths and observe various patterns that result when the relative phase of each particle is varied. Here, “phase” just means where along the circular path a certain particle is when compared to the others.

In the first animation, each of the particles arrive at the edge of the black circle at the same time to create the effect of a spinning and contracting/expanding circle.

In the second animation, the particles are phased just right to create the illusion of a circle that slides along the edge of the black circle. This is similar to the Tusi motion from the previous post except in this instance the circle doesn’t spin.

In the third animation, the phases are adjusted to make it seem like the particles move along a straight line that spins around, but really each particle is still only moving along a circular path. This is a somewhat opposite effect from the Tusi motion where the particles were always moving along straight lines.

Inspired by the not-Tusi-couple.

Manipulate[ Graphics[ {{Black, Disk[{0, 0}, 1.05]}, Table[ Rotate[ {White, Opacity[o], Circle[{.525, 0}, .525]}, n*2 Pi/m, {0, 0}], {n, 1, m, 1}], Table[ Rotate[ {White, Disk[ .525 {1 + Cos[-2 Pi (p*n/m + t)], Sin[-2 Pi (p*n/m + t)]}, .02]}, n*2 Pi/m, {0, 0}], {n, 1, m, 1}]}, PlotRange -> 1.1, ImageSize -> 500], {{m, 8, "circles"}, 1, 20, 1}, {{o, .5, "path opacity"}, 1, 0}, {{p, 0, "phase"}, 0, 2, 1}, {t, 0, 1}]

These remarks make some interesting observations in reference to a previous post. The intuition here is correct, and the motion displayed in the 2D case can be thought of as a special case of a certain 3D motion when viewed from a particular perspective. Let's experiment with this idea here.

Its important to note that two properties are at play that make this phenomenon work the way it does. This first of these, as mentioned in the response, is that the white circles do not move back and forth along their respective lines at the same speed. Each white circle actually slows down as it approaches the edge of the black circle, but speeds up as it passes through the center. More specifically, how the velocity of the white circle changes with time can be described as a sine wave. Compare the motion of the white and blue circles in the animation below. The white circle moves back and forth while maintaining the same speed throughout, whereas the blue circle's motion is sinusoidal.

The other property that the circles must exhibit in order to create the outline of a rolling circle is to reach the edge of the black circle in their respective motions at just the right time. This is accomplished by  spacing them out just right. Consider the case where each of the circles all start at the outer edge at the same time. The resulting motion would just look like this:

Here, the circles velocities do not vary sinusoidally and each moves with constant speed. By having each circle reach the outer edge at different times, the following motion results:

Notice how in this case the white circles do not form the outline of a perfect circle. Now, by keeping the circles spaced out just right, and also having the speeds vary sinusoidally we arrive at the desired effect that we saw in the original post:

Let's  try to generalize this idea into three dimensions. Instead of circles we'll use spheres, and instead of circles moving back and forth along a straight line we'll have the spheres move in a circular orbit. In the animation below, we see a sphere that is orbiting along the outer shell of a larger sphere in a circular path along the outer shell of a larger sphere. Note that the sphere is moving with constant speed. The plane in which the sphere is orbiting is displayed along with a bounding box for a better sense of depth in 3D.

Now we add some more orbiting spheres that also move in circular paths, where each of the paths lies in evenly spaced planes that are all perpendicular to a plane (not shown) that would be parallel to the front-most face of the bounding box.

In the above animation there are 8 spheres that are orbiting, and for each of the 4 planes there is a pair of spheres that orbit within the plane. Let's now view this same scene looking head-on through the front face of the bounding box:

From this perspective the planes now look like lines since we're viewing them along their edges. Here, we are taking into account the proper perspective in 3D, and you can tell by noticing that the sizes of the spheres change as they move closer or further away. We can ignore the perspective, and view the scene as projected into 2D  via an orthographic projection yielding the following animation:

It can now be seen that this effect results in exactly what we observed in the 2D case! Something interesting happened though. We  did start with 8 spheres originally but in this view half of them get obscured by the other half since one is in front of the other. If we really wanted to see 8 spheres moving around, we would actually need to work with 16 spheres in total. The following animations use 16 spheres in the same three perspectives we just experimented with, but this time the planes have been removed:

The relationship here between the linear sinusoidal motion in the 2D case and the circular orbit with constant speed in the 3D case can be seen as a generalization of an analogous relationship between the sin function and the unit circle. We wont invest in the details here, but just take a look at this animation for an idea (taken from Wikipedia):

If you would like to see the Mathematica code for the other animations just ask. : )

Each of the white circles are really just moving back and forth along a straight line. The second animation shows the same exact motion, but with straight lines added to make the linear motion obvious. Inspired by the Tusi-couple.

Manipulate[ Graphics[ {{Black, Disk[{0, 0}, 1.05]}, Table[ {White, Opacity[o], Line[ Table[1.05 s {Cos[n*2 Pi/m], Sin[n*2 Pi/m]}, {s, -1, 1, 2}]]}, {n, 1, m, 1}], Table[ {White, Disk[ Cos[2 Pi (t + n/m)] {Cos[n*2 Pi/m], Sin[n*2 Pi/m]}, .05]}, {n, 1, m, 1}]}, PlotRange -> 1.1, ImageSize -> 500], {{m, 16}, 1, 20, 1}, {{o, .5}, 1, 0}, {t, 0, 1}]

Imagine throwing a bunch of balls up into the air at just the right place, at just the right time, with just the right speed, so that all the balls reach their maximum height at the same exact time and form a picture. Simulated here is the tumblr logo, a smiley face, and a more complicated face. Can you recognize who?

Some unrealistic physical assumptions: - The balls don't collide into each other. - The balls only bounce straight up and down.

Inspired by this.

Read more for code:

circles moving in circles

Circles[color_, X_, Y_, s_, r_, IS_] := Graphics[ Table[ {color, Disk[{x, y} + s, r]}, {x, -X, X}, {y, -Y, Y}], ImageSize -> IS] W[x_, y_, w_, a_, t_] := w ((Cos[a] + Sin[a]) x + (Sin[a] - Cos[a]) y) + t*2 Pi Manipulate[ Show[ Circles[Black, X, Y, 0, r, 500], Circles[White, X, Y, .25 r*{Cos[W[x, y, w, a, t]], Sin[W[x, y, w, a, t]]}, r/2, 500] ], {X, 10, 100, 1}, {Y, 10, 100, 1}, {{r, .5}, .1, 1}, {{w, 1}, 0, 1}, {a, 0, 2 Pi}, {t, 0, 1}] Manipulate[ Show[ Circles[Black, 10, 10, 0, .6+ .2Cos[t*2Pi/4], 500], Circles[White, 10, 10, .25 (.6+ .2Cos[t*2Pi/4])*{Cos[W[x, y, .75, 3Pi/2, t]], Sin[W[x, y, .75, 3Pi/2, t]]},   (.6+ .2Cos[t*2Pi/4])/2, 500] ], {t, 0, 4}]

Circles[Ccolor_, BGcolor_, X_, Y_, s_, r_, IS_] := Graphics[ Table[ {Ccolor, Disk[{x, y} + s, r]}, {x, -X, X}, {y, -Y, Y}], ImageSize -> IS, Background -> BGcolor, PlotRange -> {{-X-1, X+1}, {-Y-1, Y+1}}] W[x_, y_, w_, a_, t_] := w ((Cos[a] + Sin[a]) x + (Sin[a] - Cos[a]) y) + t*2 Pi Manipulate[ Circles[ If[color==0,White, Black],If[color==0, Black, White], X, Y, .25 r*{Cos[W[x, y, w, a, t]], Sin[W[x, y, w, a, t]]}, r/2, IS], {color,0,1,1}, {IS, {{500}, {500, 700}}}, {X, 10, 100, 1}, {Y, 10, 100, 1}, {{r, .5}, .1, 1},{{w, 1}, 0, 1},{a, 0, 2 Pi}, {t, 0, 1}] Manipulate[ Circles[ White, Black, 10, 14,  .25 (.8)*{Cos[W[x, y, .6, 3Pi/2, t]], Sin[W[x, y, .6, 3Pi/2, t]]}, .8/2, {500,700}], {t, 0, 1}]

Flying Lotus released a brilliant and beautiful album the other week, but I still can't get over how good the last release "Cosmogramma" was. This animation in an interpretation of that album cover.

rr[n_] := (SeedRandom[n]; RandomReal[]) Rays[Q_, h_, a_, b_, N_, s_, PR_] := Graphics[ Table[ {AbsoluteThickness[h], Line[ {{a*Cos[(n + s*rr[Q*n])*2 Pi/N], a*Sin[(n + s*rr[Q*n])*2 Pi/N]}, {b*Cos[(n + s*rr[Q*n])*2 Pi/N], b*Sin[(n + s*rr[Q*n])*2 Pi/N]}} ]}, {n, 1, N, 1}], PlotRange -> PR, ImageSize -> 500] Spheres[U_, R_, op_, z_, p_, w_, D_, PR_] := Graphics[ Table[ {Opacity[op], Disk[ Mod[z + R*rr[3*U*d], R]*{Cos[2 Pi*rr[U*d]], Sin[2 Pi*rr[U*d]]},  Mod[z + R*rr[3*U*d], R]^p*w]}, {d, 1, D, 1}], PlotRange -> PR, ImageSize->500] Manipulate[ Show[ Rays[t, 1.75, .1, 3, 225, 1, 1], Spheres[18, 1.3, 1, 1.3 t/12, 1.5, .11, 15, 1]], {t, 1, 12, 1}]

Sponsored

You are using an unsupported browser and things might not work as intended. Please make sure you're using the latest version of Chrome, Firefox, Safari, or Edge.