Gradient Descent 

A visual comparison of the most common optimization technique, gradient descent with and without momentum. 

Three parameters (angle between arms) are used to minimize the distance between the hoop and target(loss function). Descent with momentum is noticeably faster.  

Dam Break

This simulation is done using SPH(Smoothed Particle Hydrodynamics), a meshless Lagrangian method. SPH represents fluid as a collection of individual particles and calculates the behavior of these particles based on their interactions with neighboring particles.

Double Slit Interference

Simulating one of the iconic experiments, Young's double slit experiment.  Here initial wavefunction of a particle is assumed to be Gaussian with known momentum(practically, its not possible), and the evolution of wavefunction is governed by Schrodinger's equations at each time step using the Crank-Nicolson numerical method. 


Deep Mandelbrot Zoom

Zoomed to mandelbrot island. 

Julia Set

Simulating Julia Set along boundry of main cardioid of the Mandelbrot Set. 

About 

Interactive 

The Galton Board

This is a classic example of order from disorder. The key principle at play here is the law of large numbers. When a large number of random events (in this case, the bouncing of balls) occur, the overall outcome tends to converge towards a predictable pattern or average. Each individual ball's path may be unpredictable, but the collective behavior of many balls follows a consistent statistical distribution(bell curve).

Who will win this race?

It depends on the track length and starting position. 

Flat vs Curve

A tiny curvature in the boundary is sufficient to make it a chaotic system!

The Lorenz Attractor

The Lorenz Attractor relates three parameters arising in fluid dynamics. It is one of the Chaos theory's most iconic images and illustrates the phenomenon now known as the butterfly effect or (more technically) sensitive dependence on initial conditions.

In first simulation, this sensitive dependence on initial conditions is illustrated. No matter how close states are initially they will follow completely different paths in future.

While in second, we see all states are attracted towards some stable states(in this case there are two).

Related

Lorenz Wheel

This simple system is a physical analog of the Lorenz Attractor. Equations describing Lorenz Attractor turn out similar to set of equations describing this system.

Assume there is a tap at top of the wheel, water comes out at a constant rate from that tap and there is a hole at bottom of every bucket. So, water inside buckets drains out at a rate depending on amount of water at that time in that bucket. 

If we simulate such system and trace the Center of Mass of it then a pattern like butterfly wings emerges.


Interactive

Retrograde Motion

When bodies move in concentric circles with different speeds, then wrt to a body, another body appears traveling back while crossing each other. This motion is Retro(back)grade(step) motion. Such motion was when observed in the Mars, puzzled geocentric believers.   

Related 

Simulation for apparent motion of the Mars from the Earth, the Mars seems travelling back across sky.

When we switch frame of reference to the Earth, we see retrograde motion of the Mars.

Chaotic Rays

This is a highly chaotic system. Initial position of rays are separated by order of 10^-8!! Still, after few reflections, they diverge rapidly to follow totally different paths.

Chaotic Balls

Being such a simple system, it is chaotic in nature!

Balls start at almost same postion but their trajectory rapidly diverges after few bounces.

Carodioid Curve

Trace of the foot of perpendicular from a point on circumference to tangents of a circle gives rise to a cardioid curve.

Trace of a point on the circumference of a disk rolling over another disk gives rise to a cardioid curve.

Light bouncing of circular boundry form a cardiod curve.

Earth-Venus Symmetry

8 Earth years are roughly 13 venus years, they together trace out this   5-fold symmetrical pattern around sun in 8 Earth years. 

Lots of cardioid curve are here.    

Mandelbrot Set

wiki 

About Mandelbrot Set 

Interactive 

Cardioid Curve is also here.

Mandelbrot Zoom

Self similarity of the mandelbrot set is shown here by zooming to a blob adjacent to main cardioid of the mandelbrot.

Golden Rotation

It seems new circles are emerging from center but whole spiral is just rotating by golden angle in each frames.

Euler Spiral

Start with a line then continue it for the same length with deflection by an angle ϴ then continue further with same length and a small increment ⍺ in previous deflection. If we follow this for a large number of iterations then we will end up with Euler-Spirals.

Various increments(integers, primes, irrartionals...) gives interesting results.

Sierpiński triangle1.mov

Sierpiński Triangle

It's a very famous fractal.

Simulated through chaos game.

Related 

covid19.mp4

Covid19

This Simulation shows effect of vaccination on infection and death. 

Spring-Pendulum Resonance

This is a spring-pendulum internal resonance system.

The system will continue to switch between up and down motion like spring and to and fro motion like pendulum. It is due to the special frequency relation of 2:1 between spring frequency and pendulum frequency.

Initially, pendulum has an angular displacement from vertical of 0.001rad only.


Related 

Football

This interactive simulation shows all sorts of spin rotation. 

Click to kick football. 

Chaotic Spring Pendulum

These two springs start at positions differing at 3rd decimal place. After a while, they diverge rapidly and follow different path.

moon_landing.mp4

Moon Landing

Tried to simulate various stages of a lander. 

Newton's Pendulum

An elegant way to demonstrate conservation of momentum.