On Mon, 24 May 2010 22:49:18 +0800, Leo Butler <l.butler at ed.ac.uk> wrote:
> James, after playing around a bit, I think the problem is simply that
> compiling your function exhausts all heap space (1G in my case). I don't
> know if this is a bug in Maxima's compiler (probably), but there is
> a work-around adapted from the plot3d info page.
>
> f(nr,ni) := block(mode_declare([nr,ni],float), ...)$
> translate(f)$
>
> block([h:.01,N:10,M,F],
> local(F),
> M:genmatrix(lambda([i,j],apply(f,[i*h,j*h])),N,N),
> F(x,y):=abs('M[round(x),round(y)]),
> plot3d(F(x/h,y/h),[x,h,N*h],[y,h,N*h],[grid,N,N]));
>
> Leo
>
That works for me.
I had a look at plot.lisp to see if I could patch it upstream, but lisp is not my cup of tea :)
Thanks for the help,
James