Skip to content

About

This is an advanced contagion simulation programmed using Java and the Java Processing library created by the Processing Foundation.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Data-Store-and-Data-Visualization-Contagion-Simulation

This is an advanced contagion simulation that I programmed using Java and the Java Processing library created by the Processing Foundation. Each color of ball represents a ball pertaining to one of three groups. Red balls are of the infected variety, blue balls are of the neutral variety, and green balls are of the immune variety. The three live updating graphs present in the simulation are color-coordinated to correspond to each color of ball. The simulation begins with a set number of balls including 1 infected and one immune ball. The infected ball has an set percent chance (defined by a variable) to infect a neutral ball or a smaller chance to remove the immunity of an immune ball (make it neutral). Immune balls work the same way RESUME WRITING HERE The graphs represent the number of balls present at a given time in the simulation. The peak of the y-axis is equivalent to the total number of balls in the simulation and the base represents 0 balls. The x-axis is time in seconds. After the simulation runs, it writes the runtime of the simulation and whether immune balls or infected balls won to a corresponding file (timeData.txt and winData.txt). Each time the program is re-run it pulls the data from the files to calculate the average runtime of the simulation (becoming more and more accurate the more you run it), and the percentage of time that immune balls vs. infected balls win.

About

This is an advanced contagion simulation programmed using Java and the Java Processing library created by the Processing Foundation.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages