Random Spheres

Create artistic three-dimensional configurations with up to 800 colored spheres.
Random and nonrandom tools are provided.



  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


"Amount" setter bar
Select the total number of spheres.
"Randomize" option
Clicking these buttons randomizes the positions, radii, and color of the spheres.
The positions of the spheres are controlled with the "configuration" options.
"Configuration" options
"Box" is the default. During randomization the centers of the spheres are randomly positioned inside a box of size 10×10×depth.
"Ellipsoid" randomly places the centers of the spheres on an ellipsoid inscribed in a 5×5×depth/2 box. Depth 0 gives a disc and depth 10 gives a ball.
"Tube" randomly places the centers of the spheres on a cylinder with radius 5 and a height of "depth". Choosing a tube with depth 0 shows a torus shape.
"Cone" randomly places the centers of the spheres on a cone of radius 5 and a height of "depth".
"Spiral" randomly places the centers of the spheres on a cylindrical spiral with radius 5 and a height of "depth".
"Double helix" will randomly place the centers of the spheres on a double helix with radius 5 and a height of "depth".
The more spheres you use, the more these configurations take shape. Explore!
"Depth" slider
This option is the height control of the selected configuration. This "depth" option only applies to the randomized positioning of all spheres. It does not restrict the setting of the coordinate of a single sphere; see below.
"Radii" options
Option "+" will multiply each sphere radius by 6/5. If the result is greater than 10, the radius will be set to 10.
Option "-" will multiply each sphere radius by 4/5.
Option "=" will give each sphere the radius of sphere number 1.
"Specularity" slider
Controls the specularity (shine) of the spheres.
"Lighting" options
You can choose between "automatic" and "neutral".
Sets the background color.
"Axes" option
Displays the , , and axis.
"Plot range" options
"All" always displays all spheres in their entirety. This might cause the view to change when you enlarge a sphere, etc.
"Fixed" always shows the same view of all data displayed in a 14×14×14 box (containing the 10×10×10 plot range). Very large spheres might be partially cut off.
The following options control single spheres:
Here you choose which sphere you want to edit.
Here you can choose a new color for a sphere. The new color will only be visible once you have moved the sphere.
"r", "x", "y", "z"
Here you can edit the radius and , , position of the selected sphere (all values are between 0 and 10).
To zoom in and out, hold the Ctrl key with the mouse button pressed while you move the mouse up and down.
To pan, hold the Shift key with the mouse button pressed while you move the mouse.
Remember that no sphere can be placed outside the box 10×10×10.


    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2016 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+