New package for drawing direction fields with gnuplot



El mar, 16-11-2010 a las 17:56 -0500, Mark H Weaver escribi?:
> Hello all,
> 

Hello Mark,

> I have created a new package, drawdf, for drawing direction fields
> using Maxima and gnuplot.  Although it lacks the interactive
> convenience of plotdf, it is far more flexible and produces nicer
> looking results.  It also has better integration with wxMaxima and
> Imaxima, allowing inline plots via wxdrawdf.
> 
> For a brief demonstration of drawdf's capabilities, please see:
> 
>    http://www.netris.org/~mhw/maxima/drawdf-demo.html
> 

> Note that drawdf is built upon the draw package, and passes very long
> lists of graphic objects to draw2d.  This exposes a scalability
> problem with draw2d, namely that it requires stack space proportional
> to the number of graphic objects.  Fortunately, the fix is simple.
> Just replace the recursive definition of draw-transform in draw.lisp
> with the following iterative version:
> 
> (defun draw-transform (expr transform)
>   (reduce #'append
>           (mapcar #'(lambda (x) (draw-transform-one x transform))
>                   expr)
>           :from-end t))
> 

This function is not present in current Maxima 5.22.1

It is no longer necessary because at this moment, draw functions accept
lists of options and graphic objects. And we don't need a specific
machinery for user defined graphic objects.

In any case, all the examples you posted work fine in command line
Maxima (removing the wx prefix, of course).


> Drawdf is part of my recent work supporting the use of Maxima in two
> classes on differential equations at Brown University, and more
> importantly in an upcoming textbook by Vladimir Dobrushkin, due out
> next year.  However, the textbook can only describe commands which are
> included in the official Maxima release.

Thanks for using Maxima in this context. 


> 
> With that in mind, is there any chance drawdf (plus the above fix)
> could be included in the next Maxima release? :)
> 

If there are no objections from other developers, I can include this
package as a user contribution to Maxima.

--
Mario