Computational Geometry and Topographical Maps

Everyone has seen a topographical map at some point during their life. In addition to the information that regular maps have, topographical maps typically show land features and elevation. How are these maps generated? Given that it's not possible to sample the elevation at every single point in the area of interest, we must use some sort of interpolation. To tackle this mathematically, we should make a few simplifications. As you might agree, the Earth is round. However, if we consider the ...
Read More

Differential Equation Model for Language Learning

Due to the COVID pandemic, the Susceptible-Infectious-Removed (SIR) model for disease spread has grown wildly in popularity. SIR is a system of differential equations that models the evolution of a disease over time. Knowledge of the SIR model is not necessary to understand this post, but there are many great videos about it online if you want to learn more. My favorites are: Simulating an epidemic by Grant Sanderson, Oxford Mathematician explains SIR Disease Model for COVID-19 (Coronavirus) by...
Read More

Creation of MathGraph3D (Part 3 – Coloring and Lighting)

This series focuses on the creation of the original version of my 3D plotting software MathGraph3D. The first part was about the overall structure of the software. The second part was concerned with all algorithms for smoothing and optimizing surfaces. This third part discusses coloring, lighting, and styling the objects that MathGraph3D plots. I'll try to keep this part shorter than the other ones... posts in this series have a tendency to spiral out of control. In MathGraph3D, every plotta...
Read More

Creation of MathGraph3D (Part 2 – Surface Algorithms)

Finally, after a few months of promising this post, here it is. This series focuses on the creation of the original version of my 3D plotting software MathGraph3D. The first part was about the overall structure of the software. This second part is concerned with all algorithms for smoothing and optimizing surfaces. The basic idea of writing a program to plot 3D surfaces isn't too difficult once you get all the 3D space handling techniques covered. A naive script would map a mesh of input poi...
Read More

Project Euler – Number Spirals

Another Project Euler problem has sparked my attention. This one isn't particularly difficult (much less than the last one I posted about - despite being in the same category of difficulty), but it's an interesting problem with a nice solution. Most people probably don't approach this in the way I did, but for once I think my solution is cleaner than the others that are posted on the forum. The problem statement can be found here: Problem 28 Statement. Like last time, I'm going to proceed un...
Read More

Project Euler – Lattice Paths

Recently, I've been doing a bunch of Project Euler problems. If you're unfamiliar with Project Euler, it's a collection of challenging puzzles that require math and programming to solve. The puzzles are grouped by difficulty level. However, I've found that the difficulty can vary wildly within the same group. One challenge that stood out as much harder than the rest is Problem 15. The problem statement can be found here: Problem 15 Statement. Now, I'm going to continue under the assumption ...
Read More

Creation of MathGraph3D (Part 1 – Foundation)

This series focuses on the creation of the original version of my 3D plotting software MathGraph3D. This first part is concerned with the overall structural components of the software. Before getting into any actual algorithms or math, it’s necessary to set up an outline for how the code will be structured. I decided to create a manager class called “Plot” that would handle everything to do with 3D space and all objects in the calculator. There are five main operations that the Plot must be ...
Read More

Fundamental Theorem of Calculus Explained

Relation between derivatives and integrals /*! * * Twitter Bootstrap * */ /*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figur...
Read More

Fluid flow in vector fields

I made a python program that simulates fluid particles flowing through a vector field. Here I'll put some things I discovered, some example gifs, and the complete code file. Some patterns A vector field is created by inputting points into a vector valued function and placing the tail of each output vector at its corresponding input. As I explored the particle flow of vector fields of different functions with my program, a few patterns started to emerge. The main ones are: Attraction p...
Read More