Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{def mandel
{def mandel.r
{lambda {:iter :cx :cy :norm :x :y :count}
{if {> :count :iter} // then norm < 4
then o // inside the set
else {if {> :norm 4} // then iter > max
then . // outside the set
else {let { {:cx :cx} {:cy :cy} {:iter :iter}
{:X {+ {* :x :x} -{* :y :y} :cx}} // compute
{:Y {+ {* 2 :x :y} :cy}} // z = z^2+c
{:count {+ :count 1}}
} {mandel.r :iter :cx :cy
{+ {* :X :X} {* :Y :Y}} // the norm
:X :Y :count} }}}}}
{lambda {:iter :cx :cy}
{mandel.r :iter
{+ {* :cx 0.05} -1.50} // centering the set
{+ {* :cy 0.05} -0.75} // inside the frame
0 0 0 0} }}
-> mandel
We call mandel directly in the wiki page
{S.map {lambda {:i} {br} // loop on y
{S.map {{lambda {:i :j} // loop on x
{mandel 20 :i :j}} :i} // compute
{S.serie 0 30}}} // x resolution
{S.serie 0 40}} // y resolution