Message Boards Message Boards

GROUPS:

[GIF] Turn, Magic Wheel (Spinning squares)

Posted 1 year ago
2627 Views
|
1 Reply
|
8 Total Likes
|

Spinning squares

Turn, Magic Wheel

Just something incredibly simple: three squares rotating around an axis. But the slightly unusual perspective makes it interesting, I think.

Here's the code:

With[{n = 3, cols = {GrayLevel[.15], RGBColor["#F6F5F5"]}},
 Manipulate[
  Graphics3D[{
    Thickness[.01], cols[[1]],
    Table[
     Line[RotationTransform[θ + t, {0, 1,  0}] 
        /@ {{0, -1, -1}, {0, -1, 1}, {0, 1, 1}, {0, 1, -1}, {0, -1, -1}}], {t, 0, 2 π - 2 π/n, 2 π/n}]
    },
   ViewPoint -> {.65, 0, 0}, ViewAngle -> π - .5, Boxed -> False, 
   PlotRange -> 1, ImageSize -> 540, Background -> cols[[-1]]],
  {θ, 0, π/n}]
 ]

enter image description here - Congratulations! This post is now a Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

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