# How to change the atom size of LatticeData [duplicate]

Using the "Image" property of LatticeData, I can generate representation of lattice structures (like the first basic example did). But it seems that the atom size is a constant, can I enlarge it?

Maybe I want a simple expression of something like this. This demonstration also has the limitation that atom size cannot be larger than $1/2$ of face diagonal.

• A replacement rule such as LatticeData[lattice, "Image"] /. Sphere[cents_, r_] :> Sphere[cents, 2 r] might work. – J. M.'s discontentment May 26 '15 at 3:59
• @Guesswhoitis. Yes, it works. I'd like to endorse your answer if you want to write it down. I was wondering why this transformation on Sphere works. Is Sphere a property of LatticeData? I can't find it in the documentation. Sorry if this is a stupid question. I'm new to Mathematica. Thank you! – Richard Cox Jun 8 '15 at 4:03
• For a number of reasons (e.g. no computer), I do not have the time to write an answer, so I'll have to ask you to answer your own question. To see why it works, have a look at InputForm[LatticeData[(* stuff *)]] to see what it's made of, and you should be able to figure out why the dilation replacement did what it did. – J. M.'s discontentment Jun 8 '15 at 4:22
• @Guesswhoitis. I got it! Thanks again. I'll write an answer later tomorrow. – Richard Cox Jun 8 '15 at 4:24

Guesswhoitis gave a nice solution to this problem on the comments above:

LatticeData[lattice, "Image"] /. Sphere[cents_, r_] :> Sphere[cents, 2 r]


Specifically, I did

LatticeData["SimpleCubic", "Image"] /. Sphere[cents_, r_] -> Ball[cents, 24 r]


(I also transformed spheres to balls here). It works because if you take a look at the InputForm[] of LatticeData[lattice, "Image"], it's something like this:

Graphics3D[
{ GraphicsComplex[{{-1, -1, -1}, {-1, -1, 1}, {-1, 1, -1}, {-1, 1, 1}, {1, -1, -1}, {1, -1, 1}, {1, 1, -1}, {1, 1, 1}},
{ EdgeForm[GrayLevel[0.8]], Opacity[0.1], Polygon[{{8, 4, 2, 6}, {8, 6, 5, 7}, {8, 7, 3, 4}, {4, 3, 1, 2},
{1, 3, 7, 5}, {2, 1, 5, 6}}]}],
{ GrayLevel[0], Specularity[GrayLevel[1], 5],
{ Sphere[{-1, -1, -1}, 1.44], Sphere[{-1, -1, 1}, 1.44], Sphere[{-1, 1, -1}, 1.44],
Sphere[{-1, 1, 1}, 1.44], Sphere[{1, -1, -1}, 1.44], Sphere[{1, -1, 1}, 1.44],
Sphere[{1, 1, -1}, 1.44], Sphere[{1, 1, 1}, 1.44]}}},
Boxed -> False, ViewPoint -> {4, 5/3, 1}
]


And you can transform the spheres, manipulating their radii and positions.