You are looking for a spherical array, but maybe you would settle for a set of points which are spread out evenly over the surface of a sphere?
If you are comfortable with the Math, you can easily script a vertex based object which can act as a 'donor of vectors/3d points' to place instances of smaller spheres (Neutrons, Protons).
def fibonacci_sphere(samples, rseed):
rnd = 1.
rnd = random.random() * samples
points = 
offset = 2./samples
increment = math.pi * (3. - math.sqrt(5.));
for i in range(samples):
y = ((i * offset) - 1) + (offset / 2);
r = math.sqrt(1 - pow(y,2))
phi = ((i + rnd) % samples) * increment
x = math.cos(phi) * r
z = math.sin(phi) * r
verts = fibonacci_sphere(120, rseed=20)
mesh = bpy.data.meshes.new("mesh_name")
mesh.from_pydata(vertices=verts, edges=, faces=)
obj = bpy.data.objects.new("obj_name", mesh)
scene = bpy.context.scene
This bit of code when Run from the Text Editor, will produce a sphere of points based on fibonacci. This might give you the approximation.
Mapping the spheres onto the points.
- The script creates a points mesh named "obj_name" and adds it to the scene, in the object properties set duplication type to Verts,
- Create the Neutron/Proton representative sphere on the same origin as the points mesh, (I like to use a Object->Surface->NURBS Sphere)
- Set the Parent of the sphere to the points mesh.
This way you get a kind of Donor / Recipient relationship between the points mesh and the Neutron/Proton spheres.
When you render, the original NURBS sphere at the origin won't be visible, in contrast to when you are viewing in the 3d viewport, you'll see it all the time.
The Sverchok addon can be be used for this kind of visualization: https://blender.stackexchange.com/a/28792/47 . It's a Free and open source modular, node based geometry system built on Blender's custom Python Nodes API.
The same script as above exists inside Sverchok as a scripted node, meaning you can adjust a slider to increase or decrease the number of points (samples), and set a different Seed value (random starting point) without having to delete the object and run the script again. Then you connect other nodes to operate on the scale of the vectors it produces, then you can pick vectors by some logic gate and separate them into 2 different meshes, then assign the different spheres to represent Neutrons and Protons.
Within the space of 2 minutes I made this: (full disclosure I'm a contributor to Sverchok.. but with practice anyone can blaze through it)
The sphere of points is indexed, and i'm splitting them up by by the boolean result of
index % 2. if that's 1 it goes into one mesh, else it goes into the other. The image above is just drawing openGL, there's no scene mesh yet.
We have nodes that do output meshes to the scene, called Bmesh Nodes
rather than every second vector, you can generate a random number for each vector and if it's larger than some value (between 0.0, 1.0), it goes into one mesh, else the other.
Here's the blend for that.
With a small modification you can even push the vectors away from the origin in a pulsating way.. drag the seed value or animate it
Though I imagine it behaves very differently, twisting and contorting..