I am currently learning my way through Mathematica and have stumbled upon a strange problem. It is asking me to implement PrimeQ
into Graphics3D
(specifically for spheres). I typed it up and displayed a picture in the notebook uploaded at the link below. If someone could explain this to me, I would greatly appreciate it and will move on to the next chapter, Pure Functions.
Disregard the input I entered. I was just trying a generic example to see how both compare in front of each other.
P.S. I'm only 14 years old. I'm working through a Mathematica book, so that I may use Mathematica to enter into the Intel or Semmes Science Fairs next year.
Prime /@ Range@PrimePi[1000]
gives you the prime numbers ... now you should solve how to "number" the 3D cells from 1 to 1000 ... $\endgroup$Graphics3D[Table[If[PrimeQ[100 i + 10 j + k + 1], Sphere[{i, j, k}, 1/2]], {i, 0, 9}, {j, 0, 9}, {k, 0, 9}]]
$\endgroup$Flatten@Table[100 i + 10 j + k + 1, {i, 0, 9}, {j, 0, 9}, {k, 0, 9}]
andFlatten@Table[100 i + 10 j + k + 1, {i, 1, 10}, {j, 1, 10}, {k, 1, 10}]
$\endgroup$