Tags

Items in Blog tagged with [math]
All items tagged with [math]

How to Graph Functions with Bézier Curves

Since Bézier curves are so ubiquitous in computer graphics, they are a natural choice for plotting the graph of a function. At their core, Bézier curves are polynomial in nature, so unless the graph is for a polynomial function with the same degree as our Bézier curve, we are forced to approximate. In this post, I will detail the thought process behind my implementation of a Bézier function plotter.

What is the carbon footprint of your EV, really?

Electric Vehicles are an attractive option for the environmentally conscious commuter chiefly due to their lack of exhaust pipe. But do EVs have a secret carbon footprint that is hidden away from us? The short answer is yes, but they are still largely better in this regard than traditional internal combustion engine vehicles. If you are considering buying an EV with carbon emissions as your primary concern, going electric is probably your best choice, but there are cases when a hybrid may actually be better (for now)!

An Extension of a Probability Puzzle

Consider a unit square and uniformly pick two points on its perimeter. What is the probability that the line that connects these two points has length less than 1?

Alternative Definitions of the Derivative

I claim that the three following definitions of the derivative are equivalent:

On Substitution Ciphers

One of the first “real” programs I ever wrote would encrypt a message using a substitution cipher and (more impressively) decrypt an encoded message without knowing the encryption key. Perhaps the first thing I had to come up with was an algorithm to take a cipher key that was used to encode a message, and transform it so that it could then be used do decode the ciphertext back into plaintext. I was aware of ROT-13’s property that if applied once to the plaintext, and again to the output ciphertext, it would yield the original plaintext. That is, ROT-13 is its own inverse. However, this is not the case for all possible keys, so I needed to find a more general algorithm.