Images, snippets, snapshots, math

View Gabriele Lami's profile on LinkedIn

Visualizzazione post con etichetta fractal. Mostra tutti i post
Visualizzazione post con etichetta fractal. Mostra tutti i post

martedì 8 dicembre 2009

Cairo-Chaos Haskell

logistic map in haskell
Haskell chaos and lib-cairo.

Is only a fixed-point iteration over this function:

lgs x r = r * x * exp(- x )

giovedì 20 agosto 2009

re: Mandelbrot Set in Haskell

import Data.Complex


conv p=(\n->".,:;|!([$O0*%#@?"!!(n-1))(ceiling (p*8)::Int)
gr=map(\y->[(x:+y)|x<-[-2,-1.97..0.7]])[-1.2,-1.13..1.2]
--px w=magnitude(foldl1(\z c ->z^2 +c)(replicate 10 w))
px w=(magnitude.last.take 10.takeWhile(\r->(magnitude r )<6).iterate(\z->z^2+w))w
image=map((map(\el->case(px el<2)of{true->conv(px el);_->' '})))gr
main=mapM_ putStrLn image


mandelbrot haskell ascii-art
better...

Mandelbrot set in Haskell

import Data.Complex
gr = map(\y-> [( x:+y )|x<-[-3,-2.95..1]])[-2,-1.9..2]
px (a:+b) = magnitude(foldl (\z c ->z^2+c) 0 (take 10([((a*x):+b)|x<-[1,1..]])))
image = map((map(\el->case(px el<2)of{true->'*';_ ->'-'})))gr
main = mapM_ putStrLn ( (map(\el->show el) )image )




A first interpretation ( a little bit unsatisfactory ) of the Mandelbrot set in Haskell









domenica 19 luglio 2009

Mandelbrot in Rebol

mandelbrot in rebol
And this is my interpretation of Mandelbrot fractal using Rebol:

This language allow to write a gui using few rows of code.
There is still a problem with zoom functionality ( I hope to fix it soon ).

You can see also my ruby mandelbrot .

martedì 14 ottobre 2008

Mandelbrot in Scala

I'm also working on a more complex mandelbrot set program in Scala.
Soon i'll post the source code.
This is the output:

Esoteric ruby Mandelbrot

Inspired from this article i've decided to
play with code in order to create my version of Madelbrot set program in ruby.
This is the code:

( not true, the code is here because the blogger editor didn't work fine when a code contain <

or > )


The code is intentionally obscure.

Is possible to decide: position, zoom factor, number of iterations, and number of lines.
The output should be like this: