Skip to content

Instantly share code, notes, and snippets.

@jazzyjackson
Created July 28, 2020 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazzyjackson/9cd3ee9caf36fafb91cb6d1e3acd1a21 to your computer and use it in GitHub Desktop.
Save jazzyjackson/9cd3ee9caf36fafb91cb6d1e3acd1a21 to your computer and use it in GitHub Desktop.
FourToSixSymmetry[FourWayImage_] := Module[
{
Hex = Graphics[Polygon[CirclePoints[6]], ImageSize -> 720],
Quarter = Graphics@Polygon[{{-1, -1}, {-1, 1}, {0, 0}, {1, 1}, {-1, 1}}],
Equalateral, SixWay
},
Equalateral = ImageResize[ImageSubtract[FourWayImage, Quarter], {360, Sqrt[3]/2 * 720 }];
SixWay = Table[ImageRotate[Equalateral, i * Pi/3], {i, -3, 2}];
ImageAdd[Prepend[SixWay, Hex]]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment