Chaos Game v2

I prepared a small demonstration of the Chaos game for some math teachers. First we used transparencies, markers, dice, and rulers, but humans are mistake-prone and slow. To The Computer! I decided to experiment with the rules of the game to see where it’d go. Human Error What happens when you bring in a random amount […]

Buffon’s Needles simulation in Processing

Buffon’s Needle is a famous way to (slowly) estimate . Here’s a program to calculate (to keep the math-hipster hatred of -day at a critical point and concave up). Link to live simulation and code. All variables are easy to change, size of window, length of needle, spacing of lines, etc. Neat program to write. […]

Two James Tanton Questions

It’s midterm week at school, and James Tanton threw out two interesting questions in two days. I spent a little time programming “solutions” to these problems (not solutions, just verifications for an infinitesimally small portion of the natural numbers). Problem One: Start with a prime, square it, and add 4. Repeat. (eg 3->13->173->…) Must eventually […]

Prime Matrix – Processing

Saw this tweet yesterday: All prime numbers between 2 and 2073600 mapped as pixels ARE THE MATRIX — Kyle Hill (@Sci_Phile) January 14, 2014 Pretty cool. Josh Giesbrecht also did some great work with Mathematica to replicate the image. Thought that primes-looking-like-the-Matrix image might have been fake. Apparently not! (#Mathematica code included.) — […]

Pebbling a Checkerboard Game (Or Chessboard)

I happened upon this tweet when I got to work this morning: So I watched the fantastic numberphile video Pebbling a Chessboard. I wanted to get the kids to play the game and I didn’t have any checkers in the classroom, so I decided to program the game in Processing. Thankfully the programming went smoothly, […]

Fractal Brownian Tree

@fawnpnguyen whoa. Need to try and make this. — Dan Anderson (@dandersod) June 4, 2013 I started off and used VPython to create the fractal, but it was slow and buggy. Here’s a movie of my first attempt. When you click you create a new “seed” for the fractal to start.  So I rewrote it […]