# [GIF] Microcosm (Stereographic projection of cube grid)

Posted 1 year ago
2880 Views
|
|
3 Total Likes
| MicrocosmThis is conceptually very simple: take a $7 \times 7$ grid of unit cubes in space, normalize to the unit sphere, stereographically project to the plane, then apply a rotation to the original grid of cubes. Here's the code: Stereo[p_] := 1/(1 - p[[-1]]) p[[;; 2]]; With[{n = 3, cols = RGBColor /@ {"#4EEAF6", "#291F71"}}, Manipulate[ Graphics[ {Opacity[.5], CapForm[None], cols[], Thickness[.006], Line[ Flatten[ Transpose[ Table[ Stereo[Normalize[#]] & /@ {{t, y Cos[θ] - z Sin[θ], z Cos[θ] + y Sin[θ]}, {y, t Cos[θ] - z Sin[θ], z Cos[θ] + t Sin[θ]}, {y, z Cos[θ] - t Sin[θ], t Cos[θ] + z Sin[θ]}}, {z, -n - 1/2, n + 1/2}, {y, -n - 1/2, n + 1/2}, {t, -n - 1/2., n + 1/2, 1/20}], {2, 3, 4, 1, 5}], 2] ] }, PlotRange -> 1, Axes -> False, ImageSize -> 540, Background -> cols[[-1]]], {θ, 0, π/2}] ] Answer - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming! Answer