Finishing off the theme of “chaos” that persists within my earlier articles, I’d like to explore how to simulate the motion of double pendulums using the console and C++. The implementation closely follows this resource, so I highly recommend taking a look at that. To make things simpler, I won’t be using a time library to calculate each frame of motion. You will also need a Windows machine to do this since it relies on Windows.h! to draw to the console.
We think of a double pendulum as a simple way to demonstrate chaotic motion. You can imagine it as…
What’s quite fascinating about mathematics is when you can turn equations and numbers into art that looks pleasing to you and I. It helps build a narrative that simple rules somehow have the power to manifest images of infinite complexity. A great example of this would be the construction of self-similar fractals using something called an IFS (Iterated Function System).
Simply put, it’s a list of (potentially non-linear) functions that iteratively manipulate some data. This is a very broad definition, however, and it may not seem obvious at first how we can use an IFS to our advantage to generate…
With the onset of a new year, I’ve decided to shift my focus away from grinding out algorithm-based problems and start to code some actual projects. I’ve always been curious about fractals, and although I could explain them reasonably well, I wanted to see if I could implement them using only the console in C++, coupled with pan/zoom functionality.
The main idea behind the entire program is this: construct a 2D vector array where each element represents a pixel with a coordinate position in the complex plane.
Writing about various STEM-related projects that I’m working on.