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:
Visualizzazione post con etichetta ruby. Mostra tutti i post
Visualizzazione post con etichetta ruby. Mostra tutti i post
martedì 14 ottobre 2008
Esoteric ruby Mandelbrot
Pubblicato da
koteth
0
commenti
sabato 4 ottobre 2008
Code reduction ( obfuscation in ruby code )
This ruby code is equivalent to the code in previous post
N = 13; k = N-1; r = (1..k).to_a ; e = [r.first, r.last];
r.each{a print(r.map{b e.include?(b*a%N)?"1 ":" "},"\n")}
Pubblicato da
koteth
0
commenti
Etichette: ruby
Iscriviti a:
Post (Atom)