[NTG-context] Implicit plots/level curves possible?

Aditya Mahajan adityam at umich.edu
Thu Oct 11 15:55:05 CEST 2018

On Tue, 9 Oct 2018, Alan Braslau wrote:

> On Mon, 8 Oct 2018 17:56:24 -0400 (EDT)
> Aditya Mahajan <adityam at umich.edu> wrote:
>> Here is a proof of concept implementation in Lua + MP so that you can use:
>> \ContourPlot
>>    [
>>      function=2*x^5 + x*y + y^5,
>>      x={0, 2},
>>      y={-2, 0.5},
>>      n=1000, % Number of discretization points
>>    ]
>> The code is fairly fast. But be careful. As with all ConTeXt key-value
>> assignment, `x = { ...}` is different from `x={...}`. I am being a bit
>> lazy here, and haven't adapted the metapost code to draw the axes to adapt
>> to the function.
> Hans and I played with Aditya's demonstration, to complete the example.
> It demonstrates some fun lua+MP+ConTeXt tricks:

Looking at lua-mplib.mpvi, isn't it better to use MP namespace (instead of 
mp) for user defined functions?

The metafun manual says that one can omit the prefix `lua` and simply use 
`mp` or `MP`. That does not seem to work.


More information about the ntg-context mailing list