File:Wigner-Seitz Cell.gif

Summary

Description
English: A Wigner-Seitz cell is the area/volume closer to a point of a Bravais lattice than to any other point.
Date
Source https://mathstodon.xyz/@j_bertolotti/112456097824589346
Author Berto
Permission
(Reusing this file)
https://mathstodon.xyz/@j_bertolotti/111363365323269417

Mathematica 14.0 code

sinstep[t_] := Sin[\[Pi]/2 t]^2;
frames1 = Table[ a1 = {1, 0, 0}; a2 = {0, 1, 0}; a3 = {0, 0, 1 - 0.5*sinstep[t]};
   pts = Flatten[Table[ i*a1 + j*a2 + k*a3, {i, -1, 1}, {j, -1, 1}, {k, -1, 1}], 2];
   vm = VoronoiMesh[pts];
   tmp = Select[MeshPrimitives[vm, 3], RegionMember[#, {0, 0, 0}] &];
   Graphics3D[{Opacity[0.5], tmp[[1]], Opacity[1], PointSize[0.02], Point[pts], FaceForm[None], EdgeForm[{Gray}], Translate[ Parallelepiped[{0, 0, 0}, {a1, a2, a3}], {{0, 0, 0}, -a1, -a2, -a3, -a1 - a2, -a1 - a3, -a2 - a3, -a1 - a2 - a3}]
     }, Lighting -> "Neutral", Boxed -> False, PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}, {-1.5, 1.5}}]
   , {t, 0, 1, 0.05}];
frames2 = Table[
   \[Alpha] = \[Pi]/10*sinstep[t];
   a1 = {1, 0, 0}; a2 = {0, 1, 0}; 
   a3 = {Sin[\[Alpha]], 0, Cos[\[Alpha]]};
   pts = Flatten[Table[ i*a1 + j*a2 + k*a3, {i, -1, 1}, {j, -1, 1}, {k, -1, 1}], 2];
   vm = VoronoiMesh[pts];
   tmp = Select[MeshPrimitives[vm, 3], RegionMember[#, {0, 0, 0}] &];
   plot = Graphics3D[{Opacity[0.5], tmp[[1]], Opacity[1], PointSize[0.02], Point[pts], FaceForm[None], EdgeForm[{Gray}], Translate[ Parallelepiped[{0, 0, 0}, {a1, a2, a3}], {{0, 0, 0}, -a1, -a2, -a3, -a1 - a2, -a1 - a3, -a2 - a3, -a1 - a2 - a3}]
      }, Lighting -> "Neutral", Boxed -> False, PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}, {-1.5, 1.5}}]
   , {t, 0, 1, 0.05}];
frames3 = Table[
   \[Tau] = sinstep[t];
   a1 = {1, 0, 0} + \[Tau] (-{1, 0, 0} + {0.5, 0, 0.5}); 
   a2 = {0, 1, 0} + \[Tau] (-{0, 1, 0} + {0.5, 0.5, 0}); 
   a3 = {0, 0, 1} + \[Tau] (-{0, 0, 1} + {0, 0.5, 0.5});
   pts = Flatten[Table[ i*a1 + j*a2 + k*a3, {i, -1, 1}, {j, -1, 1}, {k, -1, 1}], 2];
   vm = VoronoiMesh[pts];
   tmp = Select[MeshPrimitives[vm, 3], RegionMember[#, {0, 0, 0}] &];
   Graphics3D[{Opacity[0.5], tmp[[1]], Opacity[1], PointSize[0.02], Point[pts], FaceForm[None], EdgeForm[{Gray}], Translate[ Parallelepiped[{0, 0, 0}, {a1, a2, a3}], {{0, 0, 0}, -a1, -a2, -a3, -a1 - a2, -a1 - a3, -a2 - a3, -a1 - a2 - a3}]
     }, Lighting -> "Neutral", Boxed -> False, PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}, {-1.5, 1.5}}]
   , {t, 0, 1, 0.05}];
ListAnimate[Join[frames1, Reverse@frames1, frames2, Reverse@frames2, frames3, Reverse@frames3]]

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Wigner-Seitz%20Cell.gifCategory:Self-published work
Category:Animated GIF files Category:Crystallography Category:Images with Mathematica source code
Category:Animated GIF files Category:CC-Zero Category:Crystallography Category:Images with Mathematica source code Category:Self-published work