“Modern times make modern solutions possible. Therefore, the step to a digital snow globe is not that far.
Snow globes and lava lamps have one thing in common: they are impressively simple and beautiful to look at. And you can’t get enough of both of them! A snow globe is nothing more than a transparent sphere that contains a miniaturized scene. The sphere is filled with water, which contains small white flakes. You can spend hours shaking the globe over and over again, watching the snowflakes slowly sink to the ground. Very calming and meditative!
In the Northern Hemisphere, Christmastime is in the winter season and is therefore traditionally associated with snowfall. That is why there are often Christmas scenes in the snow globes.
Snow globes are just beautiful and they are just as delightfully analog as a lava lamp. Making a snow globe yourself can be tricky, as you need the right liquid and the right flakes. And it must be sealed, otherwise there will be a flood in your living room. And how to make a waterproof scene that will be placed in the sphere? If you don’t want to play around with water and glass bowls, then you have to build it digitally.
Modern times make modern solutions possible. Therefore, the step to a digital snow globe is not that difficult anymore. All you need is a display, a battery, an accelerometer and a microprocessor.
The M5Stack Core module provides a perfect base for a small and handy digital snow globe. All the necessary parts are already nicely built into one housing.
The integrated acceleration sensor can be used to determine the orientation of the device. No high accuracy is required here. The snow should only always fall downwards according to the direction of gravity. Therefore no sensor fusion or temperature correction is needed, just the values of the acceleration in X and Y direction.
A simple physical snowflake model.
Fortunately, the physical simulation of free falling snowflakes is quite simple.
Snowflakes have a small mass and a large surface area. In a vacuum they would fall as fast as a 50kg dumbbell, but in the atmosphere the air resistance slows them down. They reach their maximum velocity after a short acceleration phase and then fall to the ground at a constant speed. This is not only beautiful to look at, but also pleasantly easy to simulate.
Within each time interval of the snow fall simulation, each snowflake just need to be moved by a constant value in the direction of the gravitational force. That’s it.
But if you do it exactly like that, it will not look realistic at all. What makes snowflakes so fascinating to watch, is the way they fall slowly but unpredictably. Due to their light weight, they not only fall slowly to the ground, but their direction of movement is also changed by small air movements. To simulate these air movements and their effect on each snowflake would make the software very complex.
A simple solution is to use random values added to the falling motion. In addition, each snowflake gets its own speed factor, so that not all snowflakes fall at the same speed. This is also the case in nature, because the different shapes and sizes of snowflakes result in different falling speeds.”