I am relatively new to Mathematica, and I am trying to build a 3D polyhedron model filled with points in a face-centered cubic (fcc) pattern that shall represent atoms. I am running on Mathematica 11.3.
First I generate the fcc lattice points (excluding the centre):
fcc = Select[Tuples[Range[-5, 5], {3}], EvenQ[Total[#]] &];
list = Select[fcc, Norm[#] > 0 &];
Then the boundary of a polyhedron is discretized using:
bnd = BoundaryDiscretizeGraphics @ PolyhedronData["Dodecahedron"];
reg = RegionMember @ bnd;
And lastly, only points are picked which are in the specified region.
atoms = Pick[list, reg @ list, True]
But the list created at this step remains empty. Initially, I thought it might be caused by the fixed size PolyhedronData
assigns to Dodecahedron
. Besides the fact the BoundaryDiscretizeGraphics
does not accept scaled polyhedra, it still seems not to work if one would try to go with:
0.5*list
Anyone an idea what is happening?
PolyhedronData["Dodecahedron", "RegionFunction"]
? $\endgroup$fcc = 0.125 Select[Tuples[Range[-20, 20], {3}], EvenQ[Total[#]] &];
and then continue as before. $\endgroup$