More fractals

2005-01-05 (permalink)

Once save-canvas-to-stream was in poly-pen, there was no reasons for me not to hook fract in Araneida. Quite easy, just create a handler and save to the socket stream.

      (poly-pen:with-defaults (:backend
                               :sdl
                               :canvas (:width width :height height))
        
        (render center width height (float zoom) nb-iter color-opt)
        (araneida:request-send-headers request
                                       :content-type "image/bmp")
        (poly-pen:save (araneida:request-stream request)))

So you can now zoom the Mandelbrot Set wherever you are. The color map is still static in the web interface, the default is a nice relaxing blue map. I don't know if I should let the user play with the color map. Everyone I explain the color spiral map to seems to get confused and keep nodding politely while his eyes show that he is completely lost. I will probably end up doing a renderer for a color wheel the puts a big fat black like on the spiral path. Anyway, you read enough of that and you deserve some nice images. Ain't that blue map relaxing ? I could zoom it all night long...

Leave a comment