I've been playing with ../src/mandelbrot.py trying to get it to work with fixed-point 32-bit numbers instead of floats. It's more difficult than it was converting to floats (reals) from Python's built-in support of complex numbers; for that I just had to learn the rules of complex addition and multiplication. So what's so difficult about fixed point arithmetic? I can't find much about it on the web, and since Python automatically promotes ints to longs, one has to jump hoops to keep results within 32-bit boundaries. Just a few minutes ago, I got something to show up in the display, but it's nothing resembling the Mandelbrot set. Take a look at the screenshot and the source if you're interested. It's more of a Moiré pattern than anything else.
Anyway, now that I have some output, hopefully it won't be too hard to get the remaining bugs out; then I can port it to colorForth.
We ought to be in Phoenix in an hour or so; might even be home sometime after midnight tonight. It'll be good.
Back to blog or home page
last updated 2013-01-10 20:51:34. served from tektonic