[GIF] Come Back (Fun with the square)

Posted 2 years ago
4450 Views
|
7 Replies
|
12 Total Likes
|
 Come Back Same basic code as yesterday, but messed around with so that it's much less obvious that the underlying object is a regular octagon. No deep math, but fun nonetheless.The code: DynamicModule[{n = 8, k = 6, r, cols, verts}, cols = RGBColor /@ {"#00ADB5", "#EEEEEE", "#FF5722", "#303841"}; Manipulate[ r = Cos[s]; verts = Table[(1 - r (-1)^(i + 1)) {Cos[2 π i/n - π (r + 1)/8], Sin[2 π i/n - π (r + 1)/8]}, {i, 0, n - 1}]; Graphics[{Thickness[.0075], CapForm["Round"], Opacity[.8], Table[{Blend[cols[[;; 3]], 1 - Abs[11/5 t - 11/10]], Line[{t verts[[i]] + (1 - t) RotateRight[verts, 3][[i]], t RotateLeft[verts, k][[i]] + (1 - t) RotateLeft[verts, k + 1][[i]]}]}, {i, 1, n - 1, 2}, {t, 1/12, 11/12, 1/12}]}, PlotRange -> 3, ImageSize -> 540, Background -> cols[[4]]], {s, 0, π}]] 
7 Replies
Sort By:
Posted 2 years ago
 - another post of yours has been selected for the Staff Picks group, congratulations !We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!
Posted 2 years ago
 @Moderation Team Awesome, thanks!
Posted 2 years ago
 Something about this colour scheme feels very 80s, yet modern. I think you're on to something here...
Posted 2 years ago
 @Bianca Eifert Thanks!
Posted 2 years ago