This project provides a comprehensive collection of interactive simulations designed to explore fundamental concepts across Physics, Chemistry, Biology, and Mathematics. Each simulation offers a hands-on approach to understanding complex theoretical principles through dynamic visualization and adjustable parameters. The goal is to foster intuitive learning and allow users to experiment with various scientific phenomena.
To run this application, you need a Java Development Kit (JDK) compatible with JavaFX. The project is set up to be compiled and run using standard Java commands.
-
Compile the Source Code: Open your terminal or command prompt in the project's root directory and execute the following command to compile all Java source files:
javac -d bin --module-path lib --add-modules javafx.controls,javafx.fxml,javafx.graphics -cp "lib/json-20231013.jar;lib/commons-math3-3.6.1.jar" src/app/*.java src/core/*.java src/sims/conway/*.java src/sims/doublependulum/*.java src/sims/gasmolecules/*.java src/sims/gravity/*.java src/sims/population/*.java src/sims/probabilistic/*.java src/sims/quantum/*.java src/sims/radioactivedecay/*.java src/ui/*.java
-
Run the Application: After successful compilation, run the application using the following command:
java --module-path lib --add-modules javafx.controls,javafx.fxml,javafx.graphics -cp "bin;lib/json-20231013.jar;lib/commons-math3-3.6.1.jar" app.Main
The application features a variety of simulations, each with its unique interactive elements and educational focus.
- Description: Conway's Game of Life is a zero-player game, meaning its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.
- Author: Rohan
- Emergence: Complex patterns and behaviors (like 'gliders' or 'spaceships') arise from a very simple set of rules. This demonstrates how complexity can emerge from simplicity.
- Turing Completeness: It has been proven that the Game of Life is Turing complete, meaning it can theoretically compute anything a universal computer can, given a large enough grid and a complex enough starting pattern.
- Initial State: The starting configuration of live and dead cells. The entire future of the simulation depends solely on this initial pattern.
- Speed: Controls the rate at which generations are calculated and displayed.
- Description: A double pendulum demonstrates chaotic motion: a simple system with complex, unpredictable behavior highly sensitive to initial conditions, illustrating chaos theory.
- Author: Rohan
- Chaos Theory: The study of systems where small changes in starting conditions can lead to vastly different outcomes. The double pendulum is deterministic (follows fixed laws) but unpredictable over long periods.
- Sensitivity to Initial Conditions: Also known as the 'Butterfly Effect'. Even a minuscule change in the starting angle of an arm will result in a completely different trajectory after a short time.
- Phase Space: A way to visualize the state of the system. A plot of angle vs. angular velocity reveals the complex, non-repeating patterns of the pendulum's motion.
- Masses (m1, m2): Changing the mass distribution affects the inertia and energy of the system, altering its oscillatory patterns.
- Lengths (L1, L2): The lengths of the arms are critical to the pendulum's period and stability. Different length ratios can produce dramatically different behaviors.
- Description: This simulation demonstrates the Kinetic Theory of Gases, which explains the macroscopic properties of a gas (pressure, temperature, volume) as a consequence of the motion of its microscopic molecules.
- Author: Rohan
- Temperature: Temperature is not 'heat', but a measure of the average kinetic energy (½mv²) of the molecules. Higher speed means higher temperature.
- Pressure: Pressure is the force exerted by the gas on the container walls. It is caused by the constant, collective impact of billions of molecules colliding with the walls.
- Ideal Gas Law (PV=nRT): Observe the relationships: decreasing volume increases pressure (if temperature is constant). Increasing temperature increases pressure (if volume is constant).
- Number of Particles: Increasing the number of particles in a fixed volume increases the frequency of wall collisions, thus increasing the pressure.
- Average Speed: Increasing the speed of particles increases both the frequency and the force of wall collisions, dramatically increasing both temperature and pressure.
- Description: An n-body simulator that models the gravitational attraction between objects. This simulation allows you to explore the fundamental principles of orbital mechanics that govern everything from planets and stars to entire galaxies.
- Author: Rohan
- Newton's Law of Universal Gravitation: Every particle attracts every other particle with a force proportional to the product of their masses and inversely proportional to the square of the distance between their centers.
- Orbital Mechanics: Observe how initial velocity is key. Too slow, and a planet crashes into its star. Too fast, and it escapes orbit. Just right, and it forms a stable elliptical or circular orbit.
- Conservation of Energy/Momentum: In a closed system, the total energy and momentum remain constant. This can be observed as planets speed up when they are closer to a star and slow down when they are farther away.
- Gravitational Constant (G): This fundamental constant determines the 'strength' of gravity. Increasing it makes orbits tighter and faster.
- Mass: The primary factor in gravitational attraction. More massive objects exert a stronger pull, and are harder to move.
- Initial Velocity: The 'sideways' motion that prevents an object from falling directly into another. This is what creates orbits.
- Description: This agent-based model simulates population dynamics from the ground up. By defining simple rules for individual organisms, we can observe complex, emergent population-level behaviors like growth, stability, and collapse.
- Author: Rohan
- Exponential Growth: In an environment with unlimited resources, the population will grow exponentially as each organism reproduces. This is visible in the early stages of the simulation.
- Carrying Capacity: The maximum population size that the environment can sustain indefinitely, given the available resources (food). The population will tend to oscillate around this level.
- Resource Scarcity: When the population grows too large, it consumes food faster than it spawns. This leads to starvation and a population decline, demonstrating the principle of environmental limits.
- Reproduction Threshold: A lower threshold means easier reproduction, leading to faster population booms but also a higher risk of resource depletion and collapse.
- Food Spawn Rate: This directly determines the environment's carrying capacity. A higher rate will support a larger stable population.
- Description: The normal distribution, also known as the Gaussian distribution, is a probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean.
- Author: Darshit
- Mean (μ): The central point of the distribution. It defines the location of the peak of the bell curve.
- Standard Deviation (σ): A measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean, while a high standard deviation indicates that the values are spread out over a wider range.
- Mean: Set the average value for the distribution.
- Standard Deviation: Set the spread of the curve. Must be a positive number.
- Samples: The number of points to calculate along the curve for plotting. Higher values result in a smoother curve.
- Description: Quantum tunneling is a quantum mechanical phenomenon where a wavefunction can propagate through a potential barrier. It has important applications in nuclear fusion, scanning tunneling microscopes, and flash memory.
- Author: Deekshita
- Wave-Particle Duality: Particles like electrons exhibit wave-like properties. The simulation shows the evolution of the particle's probability wave (wavefunction) over time.
- Potential Barrier: A region of high potential energy that, in classical mechanics, a particle could not pass if its energy is lower than the barrier's height. In quantum mechanics, there is a non-zero probability for the particle to 'tunnel' through.
- Barrier Height: Controls the energy level of the potential barrier. Higher barriers are harder to tunnel through.
- Wave Momentum: Related to the energy of the incoming wave packet. Higher energy packets have a greater probability of tunneling.
- Description: A 3D simulation demonstrating the probabilistic nature of radioactive decay, visualizing atoms decaying over time based on their half-life.
- Author: Ahad
- Radioactive Decay: The process by which an unstable atomic nucleus loses energy by emitting radiation. This simulation models the decay as a probabilistic event.
- Half-Life: The time required for a quantity of a radioactive isotope to fall to half its original value. This simulation allows adjustment of the half-life.
- Probabilistic Nature: Individual decay events are random, but the overall decay of a large number of atoms follows a predictable exponential curve.
- Half-Life: Controls the rate at which atoms decay. A shorter half-life means faster decay.
- Simulation Speed: Adjusts the speed at which the simulation time progresses, affecting how quickly decay events are processed.
- Randomize Shape: Generates a new random initial configuration of atoms.
The application supports light and dark themes. You can toggle between themes to observe how each simulation adapts its visual elements and controls to the selected theme.
- JavaFX: For the graphical user interface.
- json-20231013.jar: For JSON parsing.
- commons-math3-3.6.1.jar: For mathematical utilities (used in Probabilistic Simulation).