To view this content, you need to install Java from java.com

This is similar to our first example, but only maintains a certain sample size based upon the position of the mouse on the screen. This helps to visualize the character of a random number generator over different sample sizes, showing the volatility over short samples, and the stability over longer samples. Because we only want to track a certain slice of random numbers, we need to remove old random number outside of our sample slice from the tracking array. We pull numbers from the front of our sampleQueue until we have the correct number of samples

Source code: week03_random_timeslice

Built with Processing