This is a place where I'm experimenting with interactive animations and explanations of math ideas.
The software used is written entirely by me, and can be viewed on Github. It is heavily inspired by manim: several of the class names and abstractions come directly from manim. The most significant difference is that this software is written in Typescript, which allows for user-interactive elements, while the Python-based manim is used for rendering videos.
Wave equation simulation: This page depicts some simulations of the 2-dimensional wave equation. I wrote this to help me visualize some phenomena in optics, such as refraction, and the reflective properties of conic sections.
Random walk simulation: A random walk on a lattice of dimension 1 or 2 has probability 1 of eventually returning to its starting point, but on a lattice of dimension 3 or higher has a nonzero probability of never returning. Why? This page is about visualizing and proving this fact, its continuous analog (Brownian motion), and some related ideas.
Sunlight equation (IN PROGRESS): This page addresses the phenomenon of solar angle. I got inspired to create these visualizations while investigating the questions, "What is the optimal way to orient a solar panel? How would we estimate the energy absorption over a day, depending on the time of year?"
Catenary simulation (CURRENTLY BROKEN): A simple simulation to show that a string suspended at two points and allowed to hang under the influence of gravity forms a shape identical to the graph of the hyperbolic cosine function.
The process of writing mathematical software is itself an excellent way to learn mathematics. New mathematics arises as it's needed for the task at hand, which is a great filter function for what concepts are actually useful. Making the software work is a good test of whether you've ironed out all of the details correctly. Writing this software taught me a lot, even though I already have a math PhD and have been studying math my whole life!
As such, I've written a tutorial for the animation software I've used below. You will build up the software yourself from scratch through a guided series of exercises. Assumed prerequisites are a pen and paper, an appetite for learning, and access to a computer and the internet if you wish to execute your code. I highly recommend the last step, because it will keep you honest.
The software is implemented in Typescript, a superset of Javascript that adds static typing and other features. I chose Typescript because (1) it allowed me to put interactive features and easily put the code onto the web, and (2) I wanted to learn the language itself. But you could just as well pick another language, such as Python (see, e.g. manim, which was an invaluable reference implementation for me and inspired many of the abstractions I used).
0.1: Your first Typescript program
0.2: Creating a Typescript project with Node
0.3: Web app versus Desktop app
1.2: Lines, Dots, and polygons
1.3: Coordinate systems, and graphing functions
1.5: Smooth shapes using Bezier curves
3.1: Springs, pendulums, and orbits
3.2: Differential equations and how to solve them
3.3: The heat equation in one dimension
3.4: The wave equation in one dimension
4.1: Vectors, matrices, and dot products
p>
5.4: Random walks, Markov chains, and the heat equation in higher dimensions