# [GIF]Breathe (Concentric Star Polygons Gradient) for Meditation

Posted 3 months ago
638 Views
|
2 Replies
|
5 Total Likes
|
 Inspired by Clayton's https://community.wolfram.com/groups/-/m/t/1614126 Use Clayton's code in the above link and set trigonometric function the shadows for phase shift in each frame of the iteration, you can create the gif to control your breathe rythem. anim1 = 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[-Sin[s*\[Pi]*3*r]]@* RotationTransform[3*r*\[Pi]], star52[2*s], {2}]}, {i, 0, 3/2 - #, #}]] &[\[Delta]], PlotRange -> 1, ImageSize -> 540, Background -> cols[[-1]]], {r, 0, \[Delta], 0.004}]]; And  anim2 = 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[Sin[s*\[Pi]*3*r]]@* RotationTransform[-3*r*\[Pi]], star52[2*s], {2}]}, {i, 0, 3/2 - #, #}]] &[\[Delta]], PlotRange -> 1, ImageSize -> 540, Background -> cols[[-1]]], {r, 0, \[Delta], 0.004}]]; Visualize by ListAnimate[anim[0]~Join~Reverse@anim[0]~Join~anim2~Join~Reverse[anim2]] 
2 Replies
Sort By:
Posted 3 months ago
 - 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!