Dancing Tubes

"Dancing Tubes" is a screen saver based on animated Mathematica tubes.
Click the second of the "time" buttons at the top left to play the animation. Be patient; new displays come up over time. Play with the controls to get many different effects.



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


This selects the type of component.
Here are the details (but you do not have to understand them to play with the controls):
1. Line[{{0,0,0},s{a,b,c}}]
2. Polygon[{{0,0,0},s{a,b,0},s{a,b,c}}] (triangle)
3. Polygon[{{0,0,0},s{a,0,0},s{a,c,0},s{0,b,0}}] (rectangle)
4. Cuboid[{0,0,0},s{a,b,c}]
5. Cylinder[{{0,0,0},s{a,b,c}},d]
6. Tube[{{0,0,0},s{a,b,c}},{d,0}]
7. Ellipsoid[{0,0,0},s{a,b,c}]
8. BSplineCurve[{{0,0,0},s{a,0,0},s{a,b,c}}]
9. Tube[BSplineCurve[{{0,0,0},s{a,d,e},s{a,b,c}}],f]
10. Tube[BSplineCurve[{{0,0,0},s{a,0,f},s{a,b,c}}],{d,e}]
11. Polygon[{{0,0,0},s{a,-b,0},s{a+c,0,0},s{a,b,0}}] ("kite")

In addition to the variables a, b, c, d, e, f, and s, there are also:
12. rx for rotation around the axis
13. ry for rotation around the axis
14. rz for rotation around the axis
15. g for line thickness
16. h for height (this selects how much the ring is shifted up)
17. r for ring size (this selects the radius of the ring; the petals are arranged along this ring)
Modifies the specularity to a value between 0 and 1 in steps of 0.1. High specularity means that the object strongly mirrors the light coming in from the (virtual) lamp positioned at the top right.
Selects how many tubes (or other part type) take part in the dance.
Controls the transparency of the tubes.
"frozen 1" and "frozen 2" toggler bars
Click one of the buttons to "freeze" the associated variable a, b, c, rx, ry, rz, d, e, f, g, h, r, s. This variable will not change over time after the start button has been clicked, but you can change it with the associated slider.
The tubes show a transition from one color to another color and back. Col1 is the first of these two colors. Click the color swatch to edit the color.
The tubes show a transition from one color to another color and back. Col2 is the second of these two colors. Click the color swatch to edit the color.
"rc" (randomize colors)
Click the toggle "rc" to let the system create random colors "col1" and "col2".
Click "bg" to change the background color.
- If you select simple tokens (such as "triangle" or "rectangle"), the dance looks best with a large number of tokens (see control "number" above).
- You can click "rc" (random colors) and "spec" (specularity) while the dance is running.
    • 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 © 2017 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+