On 7/8/2026 9:42 AM, Florent Michel wrote:
Hi,
Is there a way to fill a closed path with Coons or Tensor-product
shading in MetaPost/MetaFun?
Apparently they are implemented in luamplib (https://mirrors.mit.edu/
CTAN/macros/luatex/generic/luamplib/luamplib.pdf <https://
mirrors.mit.edu/CTAN/macros/luatex/generic/luamplib/luamplib.pdf> ; see
sections 1.2.20 and 1.2.21), but unless I am missing something not in
the versions of MetaPost/MetaFun in the LMTX distribution, or at least
not in the way described in the luamplib manual.
(If I understand correctly, luamplib intercepts the relevant keywords in
Lua instead of passing them to MetaPost, which could explain the
difference. Not sure my understanding is correct, though.)
One alternative is to use PGFPlots for figures that require these
shadings; but I'm wondering if thereĀ is a way to use them while
benefiting from the close integration of MetaFun with LMTX.
what is a realistic use case, apart from showing that it can be done and
adding a lot of code
these are somewhat special shading tricks that date from ps times
what y kind of graphic (PGFPlots) do you have in mind ? example?
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________