The CoffeeNotes timer is automatically set from the coffee recipe and brewer selected. The timer distinguishes the two phases as an initial bloom phase and the pour phase. The timer is controlled and adjusted with touch input, As the counter counts down the screen is filled with simulated coffee drips and wave motion.
Springs and Hooke's Law
The waves are simulated as a series of springs that follow Hooke's Law to generate forces. The wave propagates by the spread of these forces due to differences in spring heights.
The splash particles are droplets that are randomly generated an initiate deflection of the springs to generate waves. The particle physics is combined with a spread variance to create a more realistic splash simulation. The overall effect is to be more engaging as well as to provide a visual indication of when the pour will be complete.
To get the OpenGL scene to play nice with the other elements of the app was not trivial. The scene needs to fit between the animated background and the Navigation Drawer pull-out from the left edge. This required creating a OpenGL TextureView that recognizes other views and their hierarchy.