HTML and CSS Reference
In-Depth Information
Chapter 19
Tips and Tricks
What we'll cover in this chapter:
Brownian (random) motion
Random distribution
Interval- and timer-based animation
Collisions between same-mass objects
Integrating sound
Well, you made it to the last chapter. This chapter has been set aside for all the little things that didn't
really fit in anywhere else. Because these various topics are just random bits and pieces (albeit useful
bits), each section is a stand-alone unit.
Brownian (random) motion
One day, a botanist named Robert Brown looked at some grains of pollen in a drop of water and found that
they randomly moved around. Even though there was no current or motion in the water, those little grains
never settled down. He found the same thing happened with dust particles, so he concluded that the pollen
swam on its own. Even though he didn't know why they behaved like this and there wasn't a scientific
explanation for several decades, the phenomenon is named after him—just for noticing it!
Brownian motion is explained by the fact that there are zillions of water molecules in a drop of water and
are in constant motion, even if the water appears to be still. Some of these molecules collide with the
pollen or dust particle, and in doing so, transfer some of their momentum to it. Because even a speck of
 
Search WWH ::




Custom Search