Wednesday, May 31, 2006
what i do when i'm bored
so i'm really bored since my surgery. i haven't really got much of anything to do so i spend my time learning to code stuff. i've been learning to use the gimp toolkit which has been kinda fun and kinda tedious at the same time. i've gotten the hang of doing callbacks. i'll see if i can learn to do this from LISP, since i think in LISP.
i realized that GUI programming should be left to people who are good at GUI programming. i'm good at mathy theory kinda stuff so wrote some code which spits out bifurcation diagrams of a simulation of the logistic function. we model the logistic function's diffeq as x[n+1] = c*x[n]*(1 - x[n]) for various values of c the function can behave cyclically or chaotically. i am varying the value of c from 2 to 4 with x0 = .5. i darken the y coordinates (between 0 and 1) on each iteration. i iterate 50000 times on each x value or until a pixel has become entirely black (rgb=000). i put my code up here in case anyone wants to steal it. it puts out bitmap files (my code is probably a good demo of the bitmap file format for people who want to do that kind of thing. you'll notice some index swapping stuff to make the thing display correctly) feel free to email me if you've got questions. i compressed a 2000x2000 pixel version of the output and put it up here.