Showing posts with label fractals. Show all posts
Showing posts with label fractals. Show all posts

Saturday, August 13, 2016

Fun with L-systems

I haven't done much with javascript embedded in HTML before, but I had some fun today before and after our graduation ceremony (congratulations, Clifton, Dan and Karl!). For information about L-systems, see Wikipedia. Edit the following to your satisfaction. Feel free to view the source of this post, and I hereby release this post and its source code into the public domain.
If you click on "Go" with the default settings, you'll get a Koch snowflake. Here are some other systems to explore:
Axiom:
Rules:
Actions:
Preamble:
Iterations:
Show transformed text:

Friday, July 10, 2015

More Minecraft fractals

I posted an Instructable with a whole bunch of fractals in Minecraft via Python scripts.




Saturday, June 13, 2015

Generating looping color gradients with a limited palette

I was trying to generate a Mandelbrot set fractal in Minecraft using a python script. But the palette available is very limited, which led me to thinking how to generate a pleasing color progression out of a limited palette, and then I had a neat idea: just solve the Traveling Salesman Problem for the palette in RGB space. This generates a color progression that can be nicely used for looping the colors. The first version uses the larger palette of wool+hardened clay+redstone (and a version of this simulated annealing code), while the second drops the hardened clay (and now we can get an exact solution using this code).


Thursday, June 4, 2015

Python coding for Android Minecraft PE

I've been sensitized to the fact that there are many children who have no access to a PC but do have access to a smartphone. So in the interests of computer science education, I made a mod that allows for Python scripting of Minecraft Pocket Edition on Android. Instructions and links are here. The screenshots are from my Galaxy S3.