Hi,
I think the image3 addon only works on 32 platforms. Works OK as far as
I know in J6.02.
(There are some 2 color palette bugs etc)
There is an example of a mandelbrot fractal in the movie lab associated
with that addon.
From FVJ3 section 7.4 there is a different approach to Julia fractals
offered in the spirit
that escapre fractals have much broader interest. A snipet:
load '~addons/media/image3/view_m.ijs'
f=: +&_0.2j0.8@*:
escapetc=: 2 : 0
#@((,u@{:)^:(<&({:n)@# *. (<&({.n)@|@{:))^:_) f."0
)
for complex sample values:
zl_clur=: 4 : 0
w=.-~/9 o.y
h=.-~/11 o.y
xs=.({.y)+w*(i.%<:)1+x
ys=.h*(i:%j.)<.0.5+x*h%w
ys +/ xs
)
b=: f escapetc (10 255) 500 zl_clur _1.5 1.5j1.5
pal=: 255,~Hue 5r6*(i.%<:)255
view_image pal;b
Best, Cliff
On 8/12/2011 3:00 PM, Devon McCormick wrote:
> 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
>>
>
>
--
Clifford A. Reiter
Lafayette College, Easton, PA 18042
http://webbox.lafayette.edu/~reiterc/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm