Thanks to Chris for pointing out that there were formatting issues with my
last post.
I'll try to post again - this time after removing formatting so that
(hopefully) the line-endings don't get stuffed up.
require 'plot'
fm=: {&(_2 (]\"1) 4 {."1 f)
fa=: {&(4 5 {"1 f)
prob=: (+/\ 6 {"1 f) I. ?@0:
ifs=: prob (fa@[ + fm@[ +/ .* ]) ]
getPoints=: ifs^:(<200000)
plotFern=: 'dot' plot ;/@|:
f=: _99 ". ];._2 noun define
0 0 0 0.16 0 0 0.01
0.85 0.04 -0.04 0.85 0 1.60 0.85
0.20 -0.26 0.23 0.22 0 1.60 0.07
-0.15 0.28 0.26 0.24 0 0.44 0.07
)
plotFern getPoints 0 0
On Wed, Mar 2, 2016 at 11:02 AM, Ric Sherlock <[email protected]> wrote:
> I haven't played with this stuff before and found the result quite magical.
> Here is what I ended up with...
>
> require 'plot'
>
>
> fm=: {&(_2 (]\"1) 4 {."1 f)
>
> fa=: {&(4 5 {"1 f)
>
> prob=: (+/\ 6 {"1 f) I. ?@0:
>
>
> ifs=: prob (fa@[ + fm@[ +/ .* ]) ]
>
> getPoints=: ifs^:(<200000)
>
> plotFern=: 'dot' plot ;/@|:
>
>
> f=: _99 ". ];._2 noun define
>
> 0 0 0 0.16 0 0 0.01
>
> 0.85 0.04 -0.04 0.85 0 1.60 0.85
>
> 0.20 -0.26 0.23 0.22 0 1.60 0.07
>
> -0.15 0.28 0.26 0.24 0 0.44 0.07
>
> )
>
>
> plotFern getPoints 0 0
>
> On Wed, Mar 2, 2016 at 7:22 AM, Raul Miller <[email protected]> wrote:
>
>> Someone created a couple rosettacode pages:
>>
>> http://rosettacode.org/wiki/Barnsley_fern
>>
>> and
>>
>> https://en.wikipedia.org/wiki/Chaos_game
>>
>> which correspond roughly to sections 4.4 and 4.5 of your book.
>>
>> Do you feel like doing the J entries for these two rosettacode tasks?
>>
>> Or would you prefer someone less expert (such as myself) to be doing that?
>>
>> Thanks,
>>
>> --
>> Raul
>>
>> On Fri, Feb 26, 2016 at 7:07 AM, Cliff Reiter <[email protected]>
>> wrote:
>> > I posted this in Jchat, but was encouraged to also post here. Apologies
>> for
>> > the overlap.
>> >
>> > Hello fellow Jer's,
>> > I have released print and PDF versions of
>> > Fractals, Visualization and J, Fourth edition, Part 1
>> > at lulu.com. Compared to the 3rd edition, there are several new
>> sections,
>> > fairly substantial reorganization and update of scripts to JQT 8.04
>> along
>> > with the wordsmithing inspired by feedback from teaching a few times
>> with
>> > it.
>> > The table of contents for 4th ed. Part 1 and sample sections from each
>> > chapter (and lulu links) can be found at:
>> > http://webbox.lafayette.edu/~reiterc/j/fvj4/index.html
>> > Note, I have left the 3rd edition as available at lulu since it works OK
>> > with J6.02 (32bit) and is complete. So be alert to edition. Last year at
>> > this time I thought 4th ed. Part 1 would be done by August '15. So Part
>> 2 is
>> > in the works but is at least several months away.
>> > Best, Cliff
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm