This is a photograph of Morning Glory Pool from Aug. 23, 2012. (Joseph Shaw, Montana State University)

The bright, jewel-toned colors of Yellowstone's Thermal Springs  have attracted many tourists since the area became the nation's first national park in 1872. But the water's incredible hues actually came about because humans dumped so much stuff into the pools, and now scientists have figured out how to re-create the color change effect.

Researchers from Montana State University and Germany's Brandenburg University of Applied Sciences explained their model in a study published Friday by the journal Applied Optics.

The bright green, orange and yellow colors in Morning Glory Pool are a result of microbial mats, or layered complex communities of bacteria. But the pool's waters used to look like a deep, brilliant, uniform blue.

Years of tourists throwing tons of coins, trash and rocks into the pool have partially blocked an underwater vent, and that lowered the water's temperature. The colder water changed the composition of the microbial mats, and now the orange, green and yellow bacteria have spread from the outside to the center.

Morning Glory's center remains a deep blue today because of the way light scatters in the deeper waters, the researchers note.

Using information collected from thermal cameras and physical measurements, as well as historical data about the pools, researchers could re-create Morning Glory's shallow waters as they appeared between the 1880s and 1940s:

These are historic and current simulations of Morning Glory Pool. The image on the left shows the pool as it looked nearly 140 years ago, and the image on the right shows the pool after the vent is blocked by debris. (Nugent, Shaw, and Vollmer)

Even though it's been known for some time how these bright colors are created -- the complicated interplay of bacteria and underwater vents -- no mathematical model had previously existed to replicate this phenomena, according to the Optical Society, which publishes the Applied Optics journal. The researchers also looked at the Sapphire Pool and Grand Prismatic Spring.

"When we started the study, it was clear we were just doing it for fun," Michael Vollmer of Brandenburg University said in a release.

Then they realized their simple mathematical model could produce images that were strikingly similar to the pool's actual appearance, and that there actually wasn't much scholarship on the topic.

Montana State University professor and study coauthor Joseph Shaw said, "What we were able to show is that you really don't have to get terribly complex -- you can explain some very beautiful things with relatively simple models."

And some trash, too.

The Grand Prismatic Spring in present day with people walking on boardwalk. (Joseph Shaw, Montana State University)