Mandelbrot Fractal v2

I had so much fun with the original Mandelbrot program that I decided to see if I could improve it. I was amazed by how easily I was able to generate a fractal picture that looked exactly like other pictures online. I didn’t look at anyone else’s code, just went down the path and the amazing […]

Mandelbrot Fractal

I was inspired by a My Favorite presentation from a student on the Mandelbrot fractal. I played around for a half hour at school without a ton of success, but I sorted out the sticking points on the way home, and finished it up tonight. Amazingly simple (the code may not look simple, but it’s […]

Chaos Game

The chaos game, previously seen on Frank Noschese’s 180 blog and Jonathan Clayton’s blog Infinite Sums. I had to make this myself (deja vu?). Here’s what I made (processing 2.0): Check it out live. All these live links will probably work great on your smartphone too. Source code. Variations Random Triangle Chaos game. Click to set […]

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 […]

Calculate Pi with Python

Intro to Computer programming worked at calculating digits of pi today. The actual algorithms aren’t too bad, but getting more than the standard number of digits from a double is a bit trickier. Here’s a program that calculates pi using: Bailey–Borwein–Plouffe formula Bellard’s formula and Chudnovsky algorithm Holy smokes is Chudnovsky algorithm’s fast! Plouff Bellard Chudnovsky Iteration […]

Powers of 2 without a Zero

2^86 is largest known pwr of 2 that does not contain 0.What about other digits?Does each non-zero digit occur inf often among the pwrs of 2? — James Tanton (@jamestanton) March 6, 2013 Interesting. The Intro to Programming Students gave a crack at this one; and after 30 minutes all were close and half had […]

Bret Victor’s Learnable Programming

Bret Victor (Inventing on Principle) wrote an excellent essay on Learnable Programming. If you have any interest in how people learn computer programming best, or how people learn in general, then go read it. Now. Shoo. And you probably want to read it on a computer; there are several short videos to accompany the text. This essay […]

Programming Software Tools

I thought it might be useful to share a list of programming tools that I use in my Intro to Programming class. This is also an update to my earlier programming ideas post from last year. My general rule for software in this class is that it should be free and multi-platform. If they kids […]

Google Blockly

From @joshgiesbrecht , fantastic web app from Google. Blockly is a web-based programming environment that allows you to export the code as Python, Javascript, Dart (anyone outside of google use this??), or XML (wow ugly code). Blockly was just released a couple of days ago so it’s still rough around the edges, but has a nice […]