Skip to content

Brobin/mandelb0t

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mandelb0t

Mandelb0t is a Twitter bot that generates an image of the Mandelbrot set and posts it to Twitter! Currently it functions as a cron job, running every two hours. Eventually I plan to host it somewhere where it can continuously run and interact with other Twitter users.

####Follow @mandelb0t on Twitter!

Mandelbrot Set

The Mandelbrot Set is a mathematical representation of complex numbers that when rendered can create beautiful images.

Thanks to Andrew Lewis for the optimized code for generating the mandelbrot set.

Coloring of the set

I slightly modified the generation of colors so they are random. First I randomly choose a base color in RBG (three numbers between 0 and 255). Then, I average each componenet of each color with another random number to generate 64 unique colors.

There are 256 layers in this rendering of the mandelbrot set, so each color is repeated once every 64 layers. Additionally, I added another factor to alternate between dark and light colors, making each layer more distinguishable.

This algorithm makes it so that there are 64*256^3 (1,073,741,824) possible color combinations for the mandelbrot set, essentially making each one completely unique.

Examples!

Here are a couple of my favorites so far.

Purple

Blue

About

🎆 Twitter bot that generates an image of the Mandelbrot set

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages