0
$\begingroup$

I have a small question about creating a 3D array of particles. It's necessary that 265 particles are located orderly within a unit cube. One hint is to use a simple cubic structure but I don't see how to realize that. So I'm looking for some commands to distribute the particles with the same distance to all it's neighbors but I have no ideas how to do that.

$\endgroup$
  • $\begingroup$ Look for Tuples $\endgroup$ – OkkesDulgerci Jan 8 '19 at 19:50
  • $\begingroup$ Why not a simple array of $8 \times 8 \times 8$ particles? $\endgroup$ – David G. Stork Jan 8 '19 at 20:33
  • $\begingroup$ Graphics3D[Point[SpherePoints[265]]] ? $\endgroup$ – OkkesDulgerci Jan 8 '19 at 20:54
  • 1
    $\begingroup$ I am not sure this is possible since` 265^(1/3)=6.42316` particles per side of the cube which is not a whole number.. $\endgroup$ – OkkesDulgerci Jan 8 '19 at 21:37
  • 1
    $\begingroup$ It's not clear to me that everyone know what the technical definition "located orderly" is. I can see from google that it's a term in science journal articles, but I don't know what it means. $\endgroup$ – Michael E2 Jan 8 '19 at 22:04
1
$\begingroup$

You could use the code HilbertCurve3D[n] by Michael Trott (page 93 of The Mathematica Guidebook for Programming) from this question. Given input n, the function returns $2^{3n}$ orderly points within the cube from {0,0,0} to {1,1,1}. Use RandomSample to select 265, or any number, of these points.

Graphics3D[
   Point[RandomSample[HilbertCurve3D[3], 265]],
   BoxStyle -> Directive[Thick, Red]
]

random sample of unit cube

| improve this answer | |
$\endgroup$
  • $\begingroup$ What is the difference between your solution and Graphics3D[Point[RandomSample[Tuples[Range[0, 1, 1/7], 3], 265]], BoxStyle -> Directive[Thick, Red]] $\endgroup$ – OkkesDulgerci Jan 8 '19 at 21:44
  • $\begingroup$ Well I think these two solution are as good as it gets to solve further problems. Simple Cubic with some vacancy defect should do it too. Thanks alot $\endgroup$ – PaladinDanse Jan 9 '19 at 10:07
1
$\begingroup$

What about $265$ points sampled uniformly from the cube? Somewhat orderly!

Graphics3D[Point /@ (Flatten@Table[{RandomReal[],RandomReal[],RandomReal[]},{265}])]

265 points in cube

| improve this answer | |
$\endgroup$
  • $\begingroup$ Yes. This gives me a nice grid but with 512 instead of 265 particles. $\endgroup$ – PaladinDanse Jan 8 '19 at 20:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.