Easy Binomial Expansion & Bezier Curve Formulas
In this post we are going to explore two things: Learn how to easily be able to expand for ANY value using the binomial theorem (well, N has to be a positive integer…) Use that for coming up with the...
View ArticleA Fifth Way to Calculate Sine Without Trig
In a previous post, I showed Four Ways to Calculate Sine Without Trig. While reading up on rational bezier curves, I came across a 5th way! A rational bezier curve post will be coming in the (hopefully...
View ArticleWhat is Pre-multiplied Alpha and Why Does it Matter?
The usual equation for blending two pixels with alpha is to use a source factor of “source alpha” and a destination factor of “one minus source alpha”. That results in this equation: In other words,...
View ArticleThe De Casteljeau Algorithm for Evaluating Bezier Curves
Over the past year or so I’ve been digging fairly deeply into curves, mostly into Bezier curves specifically. While digging around, I’ve found many mentions of the De Casteljeau algorithm for...
View ArticleLagrange Interpolation
There are things I bump into while trying to learn new things that make me say “oh no, not THAT again!” Lagrange interpolation has been one of those things, and I’m glad to say I have finally taken the...
View ArticleRectangular Bezier Patches
Rectangular Bezier Patches are one way to bring Bezier curves into the 3rd dimension as a Bezier surface. Below is a rendered image of a quadratic Bezier rectangle (degree of (2,2)) and a cubic Bezier...
View ArticleFinite Differences
Finite differences are numerical methods for approximating function derivatives – otherwise known as the slope of a function at a specific point on the graph. This can be helpful if it’s undesirable or...
View ArticleLagrange Rectangles
In this post we are going to Frankenstein ideas from two other recent posts. If you haven’t seen these yet you should probably give them a read! Ingredient 1: Lagrange interpolation Ingredient 2:...
View ArticleCubic Hermite Interpolation
It’s a big wide world of curves out there and I have to say that most of the time, I consider myself a Bezier man. Well let me tell you… cubic Hermite splines are technically representable in Bezier...
View ArticleCubic Hermite Rectangles
Time for another Frankenstein post. This time we are going to combine the following: Cubic Hermite Interpolation Rectangular Bezier Patches The end result is going to be a Cubic Hermite Rectangle...
View ArticleResizing Images With Bicubic Interpolation
In the last post we saw how to do cubic interpolation on a grid of data. Strangely enough, when that grid is a grid of pixel data, bicubic interpolation is a common method for resizing images! Bicubic...
View ArticleBox Blur
If you ever have heard the terms “Box Blur”, “Boxcar Function”, “Box Filter”, “Boxcar Integrator” or other various combinations of those words, you may have thought it was some advanced concept that is...
View ArticleGaussian Blur
In this post we are going to take the concepts we went over in the last post (Box Blur) and apply them to Gaussian blurring. At a high level, Gaussian blurring works just like box blurring in that...
View ArticleSuper Simple Symmetric Leveled Homomorphic Encryption Implementation
Homomorphic encryption is a pretty interesting thing. It allows you to do calculations on encrypted data such that when you decrypt the results, it’s as if you did the calculations on the unencrypted...
View ArticleImproving the Security of the Super Simple Symmetric Leveled Homomorphic...
The last post showed a super simple encryption algorithm that let an untrusted person perform calculations with encrypted data such that when they gave the results back to you, you could decrypt them...
View ArticleModular Multiplicative Inverse
This post is a pre-requisite for the next thing I want to talk about so may not make a whole lot of sense or be all that interesting until shown in that context. Say you have a function like this: If...
View ArticleSolving Simultaneous Congruences (Chinese Remainder Theorem)
The equation above is a congruence. What it says is that x % 3 is 2. The equals sign with three bars means “is equivalent to”, so more literally what the equation says is “x is equivalent to 2, when...
View ArticleSolving Nested Modulus Equations
The above equation is pretty easy to solve, it just means that x is any value that when you divide by 2, gives a remainder of 1. x is all odd numbers. The more formal answer is: That reads as “x is...
View ArticleQuantum Computing References
I’m in the middle of some research to better understand quantum computing so that I can write a short series of blog posts entitled “Quantum Computing for Programmers”. These posts will be light on –...
View ArticleQuantum Computing For Programmers Part I: One Qubit
Are you a programmer? Do you have interest in learning how quantum computing works? Does hard core math and crazy abstract “philosophical” type physics questions about the nature of reality make you...
View Article