Message Boards Message Boards

[GIF] Recede (Concentric circles gradient)

Concentric circles gradient

Recede

Just a very simple gradient with concentric circles. One fun feature is the use of LogisticSigmoid[] for the color gradient. Here's the code:

DynamicModule[{s, ? = 1/12, cols = RGBColor /@ {"#07090e", "#2bb3c0", "#faf7f2"}},
 Manipulate[
  Graphics[
   Reverse[
      Table[
       s = Mod[r + i, 3/2];
       {Blend[cols, LogisticSigmoid[8 (s - 1/2)]], Disk[{0, 0}, s]},
       {i, 0, 3/2 - #, #}]] &[?],
   PlotRange -> 1, ImageSize -> 540, Background -> cols[[-1]]],
  {r, 0, ?}]
 ]
6 Replies

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming, and consider contributing your work to the The Notebook Archive!

POSTED BY: Moderation Team

Another modification is that if you wrap every verices with RotationMatrix w.r.t. s and r, you can have something like this:

anim[offset_]:=With[{\[Delta]=1/12,cols=RGBColor/@{"#07090e","#2bb3c0","#faf7f2"}},Table[Graphics[Reverse[Table[s=Mod[r+i,3/2];
{Blend[cols,LogisticSigmoid[8 (s-1/2)]],Polygon@Map[RotationTransform[-s]@*RotationTransform[2*r*\[Pi]+offset],star52[2*s],{2}]},{i,0,3/2-#,#}]]&[\[Delta]],PlotRange->1,ImageSize->540,Background->cols[[-1]]],{r,0,\[Delta],0.004}]];

ListAnimate[anim[0]~Join~anim[\[Pi]/6]]

spiral2

POSTED BY: Shenghui Yang

Another modification is that if you wrap every verices with RotationMatrix w.r.t. s and r, you can have something like this:

anim[offset_]:=With[{\[Delta]=1/12,cols=RGBColor/@{"#07090e","#2bb3c0","#faf7f2"}},Table[Graphics[Reverse[Table[s=Mod[r+i,3/2];
{Blend[cols,LogisticSigmoid[8 (s-1/2)]],Polygon@Map[RotationTransform[-s]@*RotationTransform[2*r*\[Pi]+offset],star52[2*s],{2}]},{i,0,3/2-#,#}]]&[\[Delta]],PlotRange->1,ImageSize->540,Background->cols[[-1]]],{r,0,\[Delta],0.004}]];

ListAnimate[anim[0]~Join~anim[\[Pi]/6]]

spiral2

POSTED BY: Shenghui Yang

Another modification is that if you wrap every verices with RotationMatrix w.r.t. s and r, you can have something like this:

anim[offset_]:=With[{\[Delta]=1/12,cols=RGBColor/@{"#07090e","#2bb3c0","#faf7f2"}},Table[Graphics[Reverse[Table[s=Mod[r+i,3/2];
{Blend[cols,LogisticSigmoid[8 (s-1/2)]],Polygon@Map[RotationTransform[-s]@*RotationTransform[2*r*\[Pi]+offset],star52[2*s],{2}]},{i,0,3/2-#,#}]]&[\[Delta]],PlotRange->1,ImageSize->540,Background->cols[[-1]]],{r,0,\[Delta],0.004}]];

ListAnimate[anim[0]~Join~anim[\[Pi]/6]]

spiral2

POSTED BY: Shenghui Yang

Beautiful! Slightly modify the code above we can have the following

spiralstar

anim = With[{\[Delta] = 1/12, 
    cols = RGBColor /@ {"#07090e", "#2bb3c0", "#faf7f2"}}, 
   Table[Graphics[Reverse[Table[s = Mod[r + i, 3/2];
         {Blend[cols, LogisticSigmoid[8 (s - 1/2)]], 
          Polygon@Map[RotationTransform[s], star52[2*s], {2}]}, {i, 0,
           3/2 - #, #}]] &[\[Delta]], PlotRange -> 1, 
     ImageSize -> 540, Background -> cols[[-1]]], {r, 0, \[Delta], 
     0.003}]];

Animate the plot:

ListAnimate[anim~Join~anim]

where star52 is a function from

EntityClass["Lamina", "RegularPolygram"][EntityProperty["Lamina", "Vertices"]][[1]]

input

POSTED BY: Shenghui Yang

These are very cool! Thanks!

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