I though of this too and started with the following but haven't had time to
play around with it yet.

juliaCentral=: 3 : '((*:0{y)+1{y),}.y+0,1000>|0{y'
NB.* juliaCentral ^:255]pt,c,0  NB. point, constant "c", counter


On Fri, Aug 12, 2011 at 1:27 PM, Jan Jacobs <[email protected]>wrote:

> Raul,
> thanks for the simplifications. I'had the idea to try power ^: for
> Julia but it seems to add complexity.
> I'll get the book.
> Jan.
>
> On Fri, Aug 12, 2011 at 3:48 PM, Raul Miller <[email protected]>
> wrote:
> > P.S. here are a couple transformations of the raw code, aimed at
> simplifying it:
> >
> > First, remove the dependence on the global DIM:
> >
> >
> > julia=:1 : 0
> > :
> >       scale=.1.5
> >       jx=.scale*((-:m)-x)%-:m
> >       jy=.scale*((-:m)-y)%-:m
> >       c=._0.8j0.156
> >       a=.jx j. jy
> >       i=.0
> >       while. i < 256 do.
> >               a=.(a * a) + c
> >               if. 1000 < | a do. i return. end.
> >               i=.i + 1
> >       end.
> >       255
> > )
> >
> >
> > This changes the invocation line to
> > viewmat (i.DIM) DIM julia"0 0/ (i.DIM)
> >
> > Second, simplify the loop setup:
> > julia=:1 : 0
> > :
> >       scale=.1.5
> >       c=._0.8j0.156
> >       a=. scale*1j1 - 2 * (x j. y)%m
> >        i.255
> >       for_i.i.255 do.
> >               a=.(a * a) + c
> >               if. 1000 < | a do. i return. end.
> >       end.
> >       255
> > )
> >
> > That said, I highly recommend Cliff Reiter's book.
> >
> > That said, note that the link I sent in my previous message had a url
> > that ended in a period.  But my mail client decided that that period
> > was not a part of the url, which means the url did not function
> > properly for me.
> >
> > Anyways, the name of the book is: Fractals, Visualization & J
> >
> > And here are a few urls for the book, which I am hoping will not be
> mangled:
> >
> > http://www.lulu.com/content/635966
> > http://www.lulu.com/content/635938
> >
> http://www.amazon.com/Fractals-Visualization-J-Clifford-Reiter/dp/1895721180
> > http://www.amazon.com/gp/product/1430319801/ref=pd_lpo_k2_dp_sr_1
> >
> > FYI,
> >
> > --
> > Raul
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
>
> --
> Jan Jacobs
> Esdoornstraat 33
> 5995AN Kessel
> W: www.sommaps.com
> T: +31 77 462 1887
> M: +31 6 23 82 55 21
> E: [email protected]
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to