You can drag a ball from one place to another. You can move or toss a ball a bit outside the circular wall, but it'll come back. Also, you can move a ball so it overlaps another. If you do that, they'll have to separate before they can bounce against each other again. You can toss the ball, too.
If you move your mouse outside the applet, the motion stops until you move it back to the applet.
I'm still working on this one. A bunch of balls bounce off each other and off the spherical wall. There's a slight gravitational field. Perfectly elastic collisions. Actually they're all in a plane, so it's easier figure things out. Maybe I'll try changing it to three dimensions sometime.
Note how after a while, the energy gets transferred to the little balls. They zing around while the big ones loll at the bottom. Note that the mass of a ball is proportional to the cube of its radius since they're supposed to be 3-dimensional.
<param name=color value="0:100:100">is bright red.
< param name=balldata value= "300,0,0,0,0,0:0:100;200,0,500,0,100">specifies that the first ball has a radius 300/1000 of that of the circular wall, is centered and has no motion, but will be colored white; the second ball will have a radius of 200/1000, placed above the first, initially move up, and be randomly colored; other balls will be randomly initialized.
David E. Joyce
Department of Mathematics and Computer Science
Clark University
Worcester, MA 01610
Email: djoyce@clarku.edu
My nonJava Homepage
and my
Java homepage