Image for post
Image for post
The Chaos Game Simulated

A mathematical topic that has always fascinated me is Chaos Theory. At a foundational level, Chaos Theory states that even the most random of systems have underlying laws and patterns that can create ordered outcomes. In other words, order can be born out of chaos.

A fun game that gives a sneak-peek into Chaos Theory is what is often known as the Chaos Game. In this article, I will be explaining how the Chaos Game is played and showing you how you can simulate it fairly easily in python with MatPlotLib.

The Chaos Game


Image for post
Image for post
Photo by Christopher Gower on Unsplash

When we want to visualize hundreds or thousands of calculations, doing so with a pen and paper becomes incredibly difficult. For those interested in Mathematics, Python often serves as an easy way to brute force these kinds of calculations. One such mathematical topic that can be simulated well in Python is the Collatz Conjecture. In this tutorial, we will be visualizing the conjecture with Python.

The Collatz Conjecture

The Collatz Conjecture is a mathematical conjecture(An unproven statement) that begins with the following game:

Take any Integer n. If n is even, divide it by two. If n is odd, multiple it by three…


Image for post
Image for post
Firebase Logo

We’ve all been there. We’ve made something great and we want to show it off. Maybe it's a school project, maybe it’s a prototype. Regardless, you aren’t about to send someone an entire React project for them to download and run. Firebase Hosting allows you to host and deploy your React App in a matter of minutes.

Install Firebase Tools

To get started, I’m going to assume you already have created a React app. The first step is to install Firebase onto your project. Navigate to your project and install firebase tools with the following command:

npm install -g firebase-tools


Image for post
Image for post
Photo by Lukas Blazek on Unsplash

Python is consistently rated as one of the best programming languages for data science because its highly readable, incredibly versatile, and has a very low learning curve for beginners. On top of all of that, python code is incredibly compact, meaning you can complete complex tasks in relatively few lines of code.

In this tutorial, we are going to cover the first steps to any data science project: Accessing datasets. Using Python, we are going to access both an API and a file that contains data about Senators and their voting patterns.

After reading this, using Python you should be…


Image for post
Image for post

They say a picture is worth a thousand words, but that also means that storing an image takes up considerably more storage than a word. As such, a great deal of research has been made to understand the composition of images and how these compositions can be represented efficiently. In this project, we will not be talking about image compression, but we will be breaking down the composition of images in a visually appealing way.


As programming becomes more and more accessible it can be used more easily to understand complex topics. One topic that can be better visualized through code is that of 3-Dimensional Parametric Equations. In this project, we are going to be using python and a plotting library called MatPlotLib to graph 3D Parametric Equations

Before we dive into the code, it may be worth explaining what parametric equations actually are. If you are already familiar with the idea, feel free to skip down.

When we graph conventional mathematical functions, one coordinate is dependent on the other. For example, if we look…

Lior Ben-David

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store