This is the process of reconstructing the polyhedron Icosahedron
.
Clear["Global`*"];
img = Import["https://i.sstatic.net/FAbVi.png"];
colors = DominantColors[img]
c = 1/2 (1 + Sqrt[5]);
p1 = {1, -c, 0};
p2 = {0, -1, c};
p3 = {-1, -c, 0};
xy = {{1, c, 0}, {-1, c, 0}, {-1, -c, 0}, {1, -c, 0}};
yz = {{0, 1, c}, {0, -1, c}, {0, -1, -c}, {0, 1, -c}};
zx = {{c, 0, 1}, {c, 0, -1}, {-c, 0, -1}, {-c, 0, 1}};
g=Graphics3D[{AbsolutePointSize[8], Point /@ {xy, yz, zx}, colors[[5]],
Polygon[xy], colors[[4]], Polygon[yz], colors[[3]], Polygon[zx],
Red, AbsolutePointSize[12], Point[{p1, p2, p3}]},
Lighting -> {{"Ambient", White}}]
Where the c
come from the equation.
Clear[p1, p2, p3, c];
p1 = {1, -c, 0};
p2 = {0, -1, c};
p3 = {-1, -c, 0};
Solve[{EuclideanDistance[p1, p2] == EuclideanDistance[p1, p3], c > 0},
c]
img = Import["https://i.sstatic.net/FAbVi.png"];
colors = DominantColors[img];
c = 1/2 (1 + Sqrt[5]);
xy = {{1, c, 0}, {-1, c, 0}, {-1, -c, 0}, {1, -c, 0}};
yz = {{0, 1, c}, {0, -1, c}, {0, -1, -c}, {0, 1, -c}};
zx = {{c, 0, 1}, {c, 0, -1}, {-c, 0, -1}, {-c, 0, 1}};
options = {Boxed -> False, SphericalRegion -> True,
Lighting -> {{"Ambient", White}}};
g = Graphics3D[{AbsolutePointSize[8], Point /@ {xy, yz, zx},
colors[[5]], Polygon[xy], colors[[4]], Polygon[yz], colors[[3]],
Polygon[zx], EdgeForm[Thick], FaceForm[],
ConvexHullMesh@Catenate[{xy, yz, zx}]}, options];
rotZ = Table[
Graphics3D[
GeometricTransformation[First@g, RotationTransform[t, {0, 0, 1}]],
options], {t, 0, 2 π, .2}];
rotY = Table[
Graphics3D[
GeometricTransformation[First@g, RotationTransform[t, {0, 1, 0}]],
options], {t, 0, 2 π, .2}];
rotX = Table[
Graphics3D[
GeometricTransformation[First@g, RotationTransform[t, {1, 0, 0}]],
options], {t, 0, 2 π, .2}];
ListAnimate[Catenate[{rotZ, rotY, rotX}], AnimationRate -> 5]
Export["rotation.gif", Catenate[{rotZ, rotY, rotX}]]
- Another way to construct
yz
and zx
by cyclic the coordinate.
Clear[c, xy, yz, zx];
c = 1/2 (1 + Sqrt[5]);
xy = {{1, c, 0}, {-1, c, 0}, {-1, -c, 0}, {1, -c, 0}};
yz = RotateRight /@ xy;
zx = RotateRight /@ yz;
Graphics3D[Polygon /@ {xy, yz, zx}]