[NTG-context] Fwd: metafun 2
Mikael P. Sundqvist
mickep at gmail.com
Mon Aug 19 21:20:24 CEST 2019
On Wed, Aug 14, 2019 at 5:37 PM Hans Hagen <j.hagen at xs4all.nl> wrote:
> On 8/14/2019 4:58 PM, Mikael P. Sundqvist wrote:
> > 1) 3d support. This is of course a very big request, but it would also
> > be useful for many people.
> yes ... Alan and I are thinking of some (not that we came far yet)
Please keep us updated! :)
> > 2) About graphing, it would be nice to be able to do contour polots and
> > density plots. I know I asked for contour plots some time ago, and there
> > were some examples, but I don't think there was ever some built in
> > support for it. Maybe that can be done "easy" with help of lua? I guess
> > there exist good algorithms.
> spec needed ... as 'code' can be any function it's mostly a matter of
> what to pipe back to mp
I'm not sure what kind of spec you need. What I have in mind (others could
complete) is in particular a way to plot the set of (x,y) such that
f(x,y)=0 for some given function f and some rectangle in x and y. I made
some plots with Mathematica
http://www.maths.lth.se/matematiklth/personal/mickep/Contour.pdf (too big
for the list)
The first plot shows a difficulty with a contour plot, namely
In the second one I added points, and it looks better.
In the third plot I have not specified that the expression should be equal
to 0. Then Mathematica plots the curves f(x,y)=C for various values of C.
In the background it adds a density plot (i.e. a mesh with different
colours for different values of the function.
In the fourth plot, the regionplot, the pairs (x,y) for which f(x,y)<0 are
marked. This is also very useful.
In the fifth plot there is only the densityplot, with different colors for
different values of f.
I don't know how difficult it is to implement this kind of graphics. Also,
it could be useful to be able to input the equation f(x,y)=0 and to receive
the curves as MetaPost paths. It seems that one can do contour plots with
the help of lua if that is something that helps (
Anything would be better than nothing, and I'm more than happy to test.
> > 3) (small) The possibility to have arrows in coordinate axes. I have not
> > had the possibility to test the new features today, and maybe this is
> > already built in (drawarrow?), but I mention it since I did not see it
> > in the pdf.
> no, but that is rather trivial to add
> > Again, it is very nice that you work on extending MetaPost/MetaFun
> wel, mp is ... fun (and these extension are somewhat challenging)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ntg-context