Notes about mini-fract lisp/bash program by Yannick Gingras http://ygingras.net/fract http://bitbucket.org/ygingras/mini-fract/ Thx Yannick for great program and for help ---------------------------------------- Adam Majewski fraktal.republika.pl 2009.12.09-2010.01.08 Linux Ubuntu 9.10 ( 64-bit) ============================================================= How to run mini-fract-0.6 using : - linux ( OS ) - emacs ( editor, and more ) - SBCL ( http://www.sbcl.org ) = SB Common Lisp - ZPNG ( library for png ) - ffmpeg ( http://ffmpeg.org/ ) ---------------------------------------------- Install : - ffmpeg --------------------------------------------------------- # in console : # to instal sbcl , emacs, slime and cl-swank sudo apt-get install slime cl-swank sbcl # .emacs file ( = Emacs’ initialization file) in your home directory # it adds command # (setq inferior-lisp-program "sbcl") # to this file echo '(setq inferior-lisp-program "sbcl")' >> ~/.emacs # run emacs emacs ------------------------------------------------------------- # in emacs : ; to switch to slime M-x-slime ; ( it means press Alt (and do not release ) and x, type slime ) ; Now you are in Lisp ( sbcl) ; load asdf-install ; "ASDF is like a packaging system for Common Lisp libraries " ; "ASDF-Install is a program that let's you locate and install thouse libraries with its dependencies." ; "... Steel Bank Common Lisp ... has ASDF and ASDF-Install integrated with it." ; http://langexplr.blogspot.com/search/label/lisp (asdf:oos 'asdf:load-op :asdf-install) ; install ( asdf package of ) zpng library ( Zach's image library ) ; http://www.xach.com/lisp/zpng/ ; using asdf-install ; http://common-lisp.net/project/asdf-install/tutorial/install.html (asdf-install:install :zpng) ---------------------------------------------------- # in a shell # download mini-fract-0.6 # extract it # I have done it to /home/adam/mini-fract-0.6/ ln -s ~/mini-fract-0.6/mini-fract.asd ~/.sbcl/systems --------------------------------------------------- # in a lisp ( in emacs, in the slime buffer ) ; load mini-fract (load "/home/adam/mini-fract-0.6/mini-fract.lisp") ;change-package mini-fract (in-package mini-fract) ; to make a movie ; it makes one movie using values from second item from list *interesting-regions* ; directory mov-index nb-movs (make-movie "/tmp/movs/" 1 1) ; you will find it in /tmp/movs/ directory ;---------------- second run --------------------------- ; http://www.tychoish.com/2010/03/using-asdf-install-with-sbcl/ ; (asdf:operate 'asdf:load-op 'reject) ; loads from disk not from server ;------------------------------------------------------ ; ---------------------fractional iterations -------------- ;--------------------------------------------------------- it takes integer number last iteration (n) and gives real number which is used to compute color of pixel It removes bands of level sets and gives continous coloring of exterior of Mandelbrot set = n - log2(log2(zn)) see : http://en.wikipedia.org/wiki/Mandelbrot_set#Continuous_.28smooth.29_coloring http://en.wikibooks.org/wiki/Fractals/Iterations_in_the_complex_plane/Mandelbrot_set#Real_Escape_Time http://math.unipa.it/~grim/Jbarrallo.PDF http://linas.org/art-gallery/escape/escape.html In Lisp it is ( code from mini-fract lisp/bash program by Yannick Gingras ) : (return (- nb-iter (- n (the double-float (log (the (double-float 0d0 *) (log (the (double-float 0d0 *) (sqrt mod)) 10d0)) 2d0)))))) where: n is LastIteration nb-iter is IterationMax mod = (re(zn))^2 + (im(zn))^2 ; ---------------------------------------------------------------