ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* metafun 2
@ 2019-08-14  9:54 Hans Hagen
  2019-08-14 10:18 ` Henri Menke
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Hans Hagen @ 2019-08-14  9:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

In the process of providing an additional (more abstract) interface to 
some of the old and also new MetaFun code we wonder what kind of 
features users would like to see.

http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf

As a teaser I uploaded a MyWay document that shows some of what is 
coming. All is experimental but it shows the direction. We're talking 
ConTeXt LMTX here. For instance,

     draw lmt_outline [
         content       = "hello",
         kind          = "reverse",
         fillcolor     = "darkred",
         drawcolor     = "darkblue",
         rulethickness = 1/2,
     ] ysized h shifted (3.75h,-1.25h) ;

Wraps all the outline drawing in one macro with a set of options (there 
will be xml interface definitions for that). Or take:

     draw lmt_followtext [
         content = "How well does it work {\bf 1}! ",
         path    = (fullcircle scaled 4cm),
         trace   = true,
         spread  = true,
     ] ysized 5cm ;

which is an easier interface to text along a curve. Arrows can be drawn 
with

     draw lmt_arrow [
         kind        = "draw",
         location    = "middle",
         alternative = "curved",
         path        = fullcircle
             scaled  3cm
             shifted (3.5cm,0cm),
     ] withcolor "darkblue" ;

but of course the low level interface with its many variables for 
tweaking stays around. Other examples are shown in the mentioned document.

So the question is: What do you miss in metapost support? Of course it 
should fit within the concept, so 'artistic freehand drawings' is not 
something that is likely to get interfaced. We are particularly 
interested in educational applications, if only because ConTeXt started 
out that way.

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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14  9:54 metafun 2 Hans Hagen
@ 2019-08-14 10:18 ` Henri Menke
  2019-08-14 11:16   ` Hans Hagen
  2019-08-15  6:05   ` Arthur Reutenauer
  2019-08-14 14:22 ` Otared Kavian
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 23+ messages in thread
From: Henri Menke @ 2019-08-14 10:18 UTC (permalink / raw)
  To: ntg-context

Dear Hans,

I just wanted to ask, will LMTX and MetaFun remain valid implementations
of TeX and MetaPost or do we have to expect incompatibilities?

Cheers, Henri

On 14/08/19 9:54 PM, Hans Hagen wrote:
> Hi,
> 
> In the process of providing an additional (more abstract) interface to 
> some of the old and also new MetaFun code we wonder what kind of 
> features users would like to see.
> 
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
> 
> As a teaser I uploaded a MyWay document that shows some of what is 
> coming. All is experimental but it shows the direction. We're talking 
> ConTeXt LMTX here. For instance,
> 
>      draw lmt_outline [
>          content       = "hello",
>          kind          = "reverse",
>          fillcolor     = "darkred",
>          drawcolor     = "darkblue",
>          rulethickness = 1/2,
>      ] ysized h shifted (3.75h,-1.25h) ;
> 
> Wraps all the outline drawing in one macro with a set of options (there 
> will be xml interface definitions for that). Or take:
> 
>      draw lmt_followtext [
>          content = "How well does it work {\bf 1}! ",
>          path    = (fullcircle scaled 4cm),
>          trace   = true,
>          spread  = true,
>      ] ysized 5cm ;
> 
> which is an easier interface to text along a curve. Arrows can be drawn 
> with
> 
>      draw lmt_arrow [
>          kind        = "draw",
>          location    = "middle",
>          alternative = "curved",
>          path        = fullcircle
>              scaled  3cm
>              shifted (3.5cm,0cm),
>      ] withcolor "darkblue" ;
> 
> but of course the low level interface with its many variables for 
> tweaking stays around. Other examples are shown in the mentioned document.
> 
> So the question is: What do you miss in metapost support? Of course it 
> should fit within the concept, so 'artistic freehand drawings' is not 
> something that is likely to get interfaced. We are particularly 
> interested in educational applications, if only because ConTeXt started 
> out that way.
> 
> 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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 10:18 ` Henri Menke
@ 2019-08-14 11:16   ` Hans Hagen
  2019-08-14 11:31     ` Floris van Manen
  2019-08-15  6:05   ` Arthur Reutenauer
  1 sibling, 1 reply; 23+ messages in thread
From: Hans Hagen @ 2019-08-14 11:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henri Menke

On 8/14/2019 12:18 PM, Henri Menke wrote:
> Dear Hans,
> 
> I just wanted to ask, will LMTX and MetaFun remain valid implementations
> of TeX and MetaPost or do we have to expect incompatibilities?
It depends on how you define 'valid' ... we're downward compatible ... 
but LMTX will use features available in luametatex, so when that is the 
case some code will only be available in LMTX (unless i decide to 
backport some). Wrr the TeX part: LMTX is mostly MKIV but it might 
provide extra things (or different implementations). Wrr metapost: lmtx 
can do more advanced things. There is a split context code base.

I expect most users to move on to lmtx anyway at some point. Maybe at 
some point the existing mkiv will be like mkii: frozen.

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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 11:16   ` Hans Hagen
@ 2019-08-14 11:31     ` Floris van Manen
  2019-08-14 11:53       ` Hans Hagen
  0 siblings, 1 reply; 23+ messages in thread
From: Floris van Manen @ 2019-08-14 11:31 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 87 bytes --]

where can i find the steps to install lmtx next to my current context
luatex ?

.F

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2497 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 11:31     ` Floris van Manen
@ 2019-08-14 11:53       ` Hans Hagen
  0 siblings, 0 replies; 23+ messages in thread
From: Hans Hagen @ 2019-08-14 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Floris van Manen

On 8/14/2019 1:31 PM, Floris van Manen wrote:
> where can i find the steps to install lmtx next to my current context
> luatex ?
http://pragma-ade.nl/install.htm

-----------------------------------------------------------------
                                           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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14  9:54 metafun 2 Hans Hagen
  2019-08-14 10:18 ` Henri Menke
@ 2019-08-14 14:22 ` Otared Kavian
  2019-08-14 14:49   ` Hans Hagen
  2019-08-14 14:53   ` Aditya Mahajan
  2019-08-14 14:58 ` Mikael P. Sundqvist
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 23+ messages in thread
From: Otared Kavian @ 2019-08-14 14:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

Hi Hans,

Thank you very much for the new features! I haven't yet read all the mag-1104-mkiv.pdf where you explain some of them, but after modifying one of your examples, I noticed that some funtions get a strange graph, which is probably due to the fact that metafun2 is interpolating between points in a way which is not correct.
For instance, in the following example (which is a slight modification of yours), the curve drawn is not a graph, in the sense that for some values of x it seems to be two or more values of y.

How does metafun 2 traces the curve between two discretization points?

Best regards: OK

%%% begin draw-2.tex

\starttext
\startMPcode{doublefun} 
draw lmt_function [
	xmin =  1.0, xmax = 2.5066283, xstep = .1,
	ymin = -2, ymax =  2,
%	xticks = "bottom", xsmall = 80, xlarge = 20, 
%	yticks = "left", ysmall = 40, ylarge = 4,
	code = "1.5 * math.sin(2*x^2)", 
	xlabels = "yes",
	ylabels = "yes",
	ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
	xcaption = "\strut\tfd horizontal",
	pointsymbol = "dot", pointsize = 4, pointcolor = "orange",
	sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm, 
	]
	xsized 8cm ;
\stopMPcode

\stoptext

%%% end draw-2.tex


[-- Attachment #2: draw-2.pdf --]
[-- Type: application/pdf, Size: 6106 bytes --]

[-- Attachment #3: Type: text/plain, Size: 2761 bytes --]



> On 14 Aug 2019, at 11:54, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> Hi,
> 
> In the process of providing an additional (more abstract) interface to some of the old and also new MetaFun code we wonder what kind of features users would like to see.
> 
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
> 
> As a teaser I uploaded a MyWay document that shows some of what is coming. All is experimental but it shows the direction. We're talking ConTeXt LMTX here. For instance,
> 
>    draw lmt_outline [
>        content       = "hello",
>        kind          = "reverse",
>        fillcolor     = "darkred",
>        drawcolor     = "darkblue",
>        rulethickness = 1/2,
>    ] ysized h shifted (3.75h,-1.25h) ;
> 
> Wraps all the outline drawing in one macro with a set of options (there will be xml interface definitions for that). Or take:
> 
>    draw lmt_followtext [
>        content = "How well does it work {\bf 1}! ",
>        path    = (fullcircle scaled 4cm),
>        trace   = true,
>        spread  = true,
>    ] ysized 5cm ;
> 
> which is an easier interface to text along a curve. Arrows can be drawn with
> 
>    draw lmt_arrow [
>        kind        = "draw",
>        location    = "middle",
>        alternative = "curved",
>        path        = fullcircle
>            scaled  3cm
>            shifted (3.5cm,0cm),
>    ] withcolor "darkblue" ;
> 
> but of course the low level interface with its many variables for tweaking stays around. Other examples are shown in the mentioned document.
> 
> So the question is: What do you miss in metapost support? Of course it should fit within the concept, so 'artistic freehand drawings' is not something that is likely to get interfaced. We are particularly interested in educational applications, if only because ConTeXt started out that way.
> 
> 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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #4: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 14:22 ` Otared Kavian
@ 2019-08-14 14:49   ` Hans Hagen
  2019-08-14 14:53   ` Aditya Mahajan
  1 sibling, 0 replies; 23+ messages in thread
From: Hans Hagen @ 2019-08-14 14:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Otared Kavian

On 8/14/2019 4:22 PM, Otared Kavian wrote:
> Hi Hans,
> 
> Thank you very much for the new features! I haven't yet read all the mag-1104-mkiv.pdf where you explain some of them, but after modifying one of your examples, I noticed that some funtions get a strange graph, which is probably due to the fact that metafun2 is interpolating between points in a way which is not correct.
> For instance, in the following example (which is a slight modification of yours), the curve drawn is not a graph, in the sense that for some values of x it seems to be two or more values of y.
> 
> How does metafun 2 traces the curve between two discretization points?

it doesn't, it just connects the dots, so, just use a smaller step, like

xstep = .01

(The upcoming luagraph module will provide some interpolators so at some 
point we can hook these in.)

(btw, there are a lot of extra math functions, also or complex numbers)

> Best regards: OK
> 
> %%% begin draw-2.tex
> 
> \starttext
> \startMPcode{doublefun}
> draw lmt_function [
> 	xmin =  1.0, xmax = 2.5066283, xstep = .1,
> 	ymin = -2, ymax =  2,
> %	xticks = "bottom", xsmall = 80, xlarge = 20,
> %	yticks = "left", ysmall = 40, ylarge = 4,
> 	code = "1.5 * math.sin(2*x^2)",
> 	xlabels = "yes",
> 	ylabels = "yes",
> 	ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
> 	xcaption = "\strut\tfd horizontal",
> 	pointsymbol = "dot", pointsize = 4, pointcolor = "orange",
> 	sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm,
> 	]
> 	xsized 8cm ;
> \stopMPcode
> 
> \stoptext
> 
> %%% end draw-2.tex

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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 14:22 ` Otared Kavian
  2019-08-14 14:49   ` Hans Hagen
@ 2019-08-14 14:53   ` Aditya Mahajan
  2019-08-14 14:58     ` Otared Kavian
  1 sibling, 1 reply; 23+ messages in thread
From: Aditya Mahajan @ 2019-08-14 14:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 14 Aug 2019, Otared Kavian wrote:

> Hi Hans,
>
> Thank you very much for the new features! I haven't yet read all the mag-1104-mkiv.pdf where you explain some of them, but after modifying one of your examples, I noticed that some funtions get a strange graph, which is probably due to the fact that metafun2 is interpolating between points in a way which is not correct.
> For instance, in the following example (which is a slight modification of yours), the curve drawn is not a graph, in the sense that for some values of x it seems to be two or more values of y.
>
> How does metafun 2 traces the curve between two discretization points?
>
> Best regards: OK
>
> %%% begin draw-2.tex
>
> \starttext
> \startMPcode{doublefun}
> draw lmt_function [
> 	xmin =  1.0, xmax = 2.5066283, xstep = .1,
> 	ymin = -2, ymax =  2,
> %	xticks = "bottom", xsmall = 80, xlarge = 20,
> %	yticks = "left", ysmall = 40, ylarge = 4,
> 	code = "1.5 * math.sin(2*x^2)",
> 	xlabels = "yes",
> 	ylabels = "yes",
> 	ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
> 	xcaption = "\strut\tfd horizontal",
> 	pointsymbol = "dot", pointsize = 4, pointcolor = "orange",
> 	sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm,
> 	]
> 	xsized 8cm ;
> \stopMPcode
>
> \stoptext

This looks like a typical .. vs -- issue. I think there is a way to change 
how the points are connected, but I'll have to look at the code again.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 14:53   ` Aditya Mahajan
@ 2019-08-14 14:58     ` Otared Kavian
  2019-08-14 15:11       ` Wolfgang Schuster
  2019-08-14 15:34       ` Hans Hagen
  0 siblings, 2 replies; 23+ messages in thread
From: Otared Kavian @ 2019-08-14 14:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On 14 Aug 2019, at 16:53, Aditya Mahajan <adityam@umich.edu> wrote:
> 
> […]
> This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again.
> 
> Aditya


Indeed, this seems the right explanation.
@ Hans: would it be possible to change the connecting mechanism from .. to -- ? (Possibly by adding an option?)

Thanks for your attention, 
Best regards: OK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14  9:54 metafun 2 Hans Hagen
  2019-08-14 10:18 ` Henri Menke
  2019-08-14 14:22 ` Otared Kavian
@ 2019-08-14 14:58 ` Mikael P. Sundqvist
  2019-08-14 15:37   ` Hans Hagen
  2019-08-16 23:31 ` Adam Reviczky
  2019-09-08  8:42 ` Aditya Mahajan
  4 siblings, 1 reply; 23+ messages in thread
From: Mikael P. Sundqvist @ 2019-08-14 14:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3560 bytes --]

On Wed, Aug 14, 2019 at 11:55 AM Hans Hagen <j.hagen@xs4all.nl> wrote:

> Hi,
>
> In the process of providing an additional (more abstract) interface to
> some of the old and also new MetaFun code we wonder what kind of
> features users would like to see.
>
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
>
> As a teaser I uploaded a MyWay document that shows some of what is
> coming. All is experimental but it shows the direction. We're talking
> ConTeXt LMTX here. For instance,
>
>      draw lmt_outline [
>          content       = "hello",
>          kind          = "reverse",
>          fillcolor     = "darkred",
>          drawcolor     = "darkblue",
>          rulethickness = 1/2,
>      ] ysized h shifted (3.75h,-1.25h) ;
>
> Wraps all the outline drawing in one macro with a set of options (there
> will be xml interface definitions for that). Or take:
>
>      draw lmt_followtext [
>          content = "How well does it work {\bf 1}! ",
>          path    = (fullcircle scaled 4cm),
>          trace   = true,
>          spread  = true,
>      ] ysized 5cm ;
>
> which is an easier interface to text along a curve. Arrows can be drawn
> with
>
>      draw lmt_arrow [
>          kind        = "draw",
>          location    = "middle",
>          alternative = "curved",
>          path        = fullcircle
>              scaled  3cm
>              shifted (3.5cm,0cm),
>      ] withcolor "darkblue" ;
>
> but of course the low level interface with its many variables for
> tweaking stays around. Other examples are shown in the mentioned document.
>
> So the question is: What do you miss in metapost support? Of course it
> should fit within the concept, so 'artistic freehand drawings' is not
> something that is likely to get interfaced. We are particularly
> interested in educational applications, if only because ConTeXt started
> out that way.
>
> 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 : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

Hi,

this looks very promising!!

Since you ask for feature requests:

1) 3d support. This is of course a very big request, but it would also be
useful for many people.
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.
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.

Again, it is very nice that you work on extending MetaPost/MetaFun further!!

/Mikael

[-- Attachment #1.2: Type: text/html, Size: 5200 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 14:58     ` Otared Kavian
@ 2019-08-14 15:11       ` Wolfgang Schuster
  2019-08-14 15:34       ` Hans Hagen
  1 sibling, 0 replies; 23+ messages in thread
From: Wolfgang Schuster @ 2019-08-14 15:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Otared Kavian

Otared Kavian schrieb am 14.08.2019 um 16:58:
>> On 14 Aug 2019, at 16:53, Aditya Mahajan <adityam@umich.edu> wrote:
>>
>> […]
>> This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again.
>>
>> Aditya
> Indeed, this seems the right explanation.
> @ Hans: would it be possible to change the connecting mechanism from .. to -- ? (Possibly by adding an option?)
draw lmt_function [ shape = "line", ... ] ;

The argument for shape doesn't matter because only 'shape = "contour"' 
is checked to use .. as connector.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 14:58     ` Otared Kavian
  2019-08-14 15:11       ` Wolfgang Schuster
@ 2019-08-14 15:34       ` Hans Hagen
  1 sibling, 0 replies; 23+ messages in thread
From: Hans Hagen @ 2019-08-14 15:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Otared Kavian

On 8/14/2019 4:58 PM, Otared Kavian wrote:
> 
>> On 14 Aug 2019, at 16:53, Aditya Mahajan <adityam@umich.edu> wrote:
>>
>> […]
>> This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again.
>>
>> Aditya
> 
> 
> Indeed, this seems the right explanation.
> @ Hans: would it be possible to change the connecting mechanism from .. to -- ? (Possibly by adding an option?)

shape = "line"

> Thanks for your attention,
> Best regards: OK
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 14:58 ` Mikael P. Sundqvist
@ 2019-08-14 15:37   ` Hans Hagen
       [not found]     ` <CAHy-LL9D5NB6qZYj+QynCWR-rqk6suD3reepLUgO8KOwrjwnXA@mail.gmail.com>
  0 siblings, 1 reply; 23+ messages in thread
From: Hans Hagen @ 2019-08-14 15:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mikael P. Sundqvist

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)

> 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

> 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 further!!
wel, mp is ... fun (and these extension are somewhat challenging)

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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14 10:18 ` Henri Menke
  2019-08-14 11:16   ` Hans Hagen
@ 2019-08-15  6:05   ` Arthur Reutenauer
  1 sibling, 0 replies; 23+ messages in thread
From: Arthur Reutenauer @ 2019-08-15  6:05 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

On Wed, Aug 14, 2019 at 10:18:19PM +1200, Henri Menke wrote:
> I just wanted to ask, will LMTX and MetaFun remain valid implementations
> of TeX and MetaPost or do we have to expect incompatibilities?

  If you mean “will luametatex pass the trip test”, the answer is
probably no: LuaTeX already diverged from Knuth’s TeX in small ways, for
example by allowing the first word of a paragraph to be hyphenated.

	Best,

		Arthur
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14  9:54 metafun 2 Hans Hagen
                   ` (2 preceding siblings ...)
  2019-08-14 14:58 ` Mikael P. Sundqvist
@ 2019-08-16 23:31 ` Adam Reviczky
  2019-08-17  1:27   ` Alan Braslau
  2019-09-08  8:42 ` Aditya Mahajan
  4 siblings, 1 reply; 23+ messages in thread
From: Adam Reviczky @ 2019-08-16 23:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3633 bytes --]

Hi Hans,

One MetaPost feature that I was looking forward to is the ability to create
a fill between two shapes.
Something like a difference function of two path's.

For logos I use the workaround with creating a path alongside the excluded
areas but it is always cumbersome.

I have briefly mentioned it back here:
https://mailman.ntg.nl/pipermail/ntg-context/2011/056910.html

Just for illustration purposes, if I wanted to fill the area in between two
circles:

*path p ;
**p := fullcircle scaled 1cm ;
**path q ;
**q := fullcircle scaled .5cm ;
*

Instead of creating a new path along both circles with:


*r := p -- reverse q -- cycle ;*

It would be nice to have something like:

*fill p excluding q ;*

or something like that.

I mainly have use-cases for differences in shapes, but filling the
intersection of two shapes would be the same idea.

Thanks,
Adam


On Wed, Aug 14, 2019 at 10:57 AM Hans Hagen <j.hagen@xs4all.nl> wrote:

> Hi,
>
> In the process of providing an additional (more abstract) interface to
> some of the old and also new MetaFun code we wonder what kind of
> features users would like to see.
>
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
>
> As a teaser I uploaded a MyWay document that shows some of what is
> coming. All is experimental but it shows the direction. We're talking
> ConTeXt LMTX here. For instance,
>
>      draw lmt_outline [
>          content       = "hello",
>          kind          = "reverse",
>          fillcolor     = "darkred",
>          drawcolor     = "darkblue",
>          rulethickness = 1/2,
>      ] ysized h shifted (3.75h,-1.25h) ;
>
> Wraps all the outline drawing in one macro with a set of options (there
> will be xml interface definitions for that). Or take:
>
>      draw lmt_followtext [
>          content = "How well does it work {\bf 1}! ",
>          path    = (fullcircle scaled 4cm),
>          trace   = true,
>          spread  = true,
>      ] ysized 5cm ;
>
> which is an easier interface to text along a curve. Arrows can be drawn
> with
>
>      draw lmt_arrow [
>          kind        = "draw",
>          location    = "middle",
>          alternative = "curved",
>          path        = fullcircle
>              scaled  3cm
>              shifted (3.5cm,0cm),
>      ] withcolor "darkblue" ;
>
> but of course the low level interface with its many variables for
> tweaking stays around. Other examples are shown in the mentioned document.
>
> So the question is: What do you miss in metapost support? Of course it
> should fit within the concept, so 'artistic freehand drawings' is not
> something that is likely to get interfaced. We are particularly
> interested in educational applications, if only because ConTeXt started
> out that way.
>
> 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 : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 5542 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-16 23:31 ` Adam Reviczky
@ 2019-08-17  1:27   ` Alan Braslau
  2019-08-17  8:52     ` Hans Hagen
  0 siblings, 1 reply; 23+ messages in thread
From: Alan Braslau @ 2019-08-17  1:27 UTC (permalink / raw)
  To: Adam Reviczky; +Cc: mailing list for ConTeXt users

We have eofill in MP (in pdf/ps in fact) and that likely will do what you need.

Alan


On Sat, 17 Aug 2019 00:31:38 +0100
Adam Reviczky <reviczky@gmail.com> wrote:

> Hi Hans,
> 
> One MetaPost feature that I was looking forward to is the ability to create
> a fill between two shapes.
> Something like a difference function of two path's.
> 
> For logos I use the workaround with creating a path alongside the excluded
> areas but it is always cumbersome.
> 
> I have briefly mentioned it back here:
> https://mailman.ntg.nl/pipermail/ntg-context/2011/056910.html
> 
> Just for illustration purposes, if I wanted to fill the area in between two
> circles:
> 
> *path p ;
> **p := fullcircle scaled 1cm ;
> **path q ;
> **q := fullcircle scaled .5cm ;
> *
> 
> Instead of creating a new path along both circles with:
> 
> 
> *r := p -- reverse q -- cycle ;*
> 
> It would be nice to have something like:
> 
> *fill p excluding q ;*
> 
> or something like that.
> 
> I mainly have use-cases for differences in shapes, but filling the
> intersection of two shapes would be the same idea.
> 
> Thanks,
> Adam
> 
> 
> On Wed, Aug 14, 2019 at 10:57 AM Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> > Hi,
> >
> > In the process of providing an additional (more abstract) interface to
> > some of the old and also new MetaFun code we wonder what kind of
> > features users would like to see.
> >
> > http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
> >
> > As a teaser I uploaded a MyWay document that shows some of what is
> > coming. All is experimental but it shows the direction. We're talking
> > ConTeXt LMTX here. For instance,
> >
> >      draw lmt_outline [
> >          content       = "hello",
> >          kind          = "reverse",
> >          fillcolor     = "darkred",
> >          drawcolor     = "darkblue",
> >          rulethickness = 1/2,
> >      ] ysized h shifted (3.75h,-1.25h) ;
> >
> > Wraps all the outline drawing in one macro with a set of options (there
> > will be xml interface definitions for that). Or take:
> >
> >      draw lmt_followtext [
> >          content = "How well does it work {\bf 1}! ",
> >          path    = (fullcircle scaled 4cm),
> >          trace   = true,
> >          spread  = true,
> >      ] ysized 5cm ;
> >
> > which is an easier interface to text along a curve. Arrows can be drawn
> > with
> >
> >      draw lmt_arrow [
> >          kind        = "draw",
> >          location    = "middle",
> >          alternative = "curved",
> >          path        = fullcircle
> >              scaled  3cm
> >              shifted (3.5cm,0cm),
> >      ] withcolor "darkblue" ;
> >
> > but of course the low level interface with its many variables for
> > tweaking stays around. Other examples are shown in the mentioned document.
> >
> > So the question is: What do you miss in metapost support? Of course it
> > should fit within the concept, so 'artistic freehand drawings' is not
> > something that is likely to get interfaced. We are particularly
> > interested in educational applications, if only because ConTeXt started
> > out that way.
> >
> > 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 : ntg-context@ntg.nl /
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> >
> > ___________________________________________________________________________________
> >  

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-17  1:27   ` Alan Braslau
@ 2019-08-17  8:52     ` Hans Hagen
  2019-08-17 18:12       ` Adam Reviczky
  0 siblings, 1 reply; 23+ messages in thread
From: Hans Hagen @ 2019-08-17  8:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau, Adam Reviczky

On 8/17/2019 3:27 AM, Alan Braslau wrote:
> We have eofill in MP (in pdf/ps in fact) and that likely will do what you need.
You forgot the MWD (Minimal Working Demo):

\starttext

\startMPpage
path p ; p := fullcircle scaled 1cm ;
path q ; q := fullcircle scaled .5cm ;

nofill p ;
eofill q ;
\stopMPpage

\stoptext

-----------------------------------------------------------------
                                           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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-17  8:52     ` Hans Hagen
@ 2019-08-17 18:12       ` Adam Reviczky
  2019-08-19 19:15         ` Jorge Manuel
  0 siblings, 1 reply; 23+ messages in thread
From: Adam Reviczky @ 2019-08-17 18:12 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 961 bytes --]

Hi Hans, Alan,

This is really cool! Not sure how I missed this feature, works exactly for
my use-case.

Thanks a lot for pointing this out, I was able to find it in the MAPS as
well.

Cheers,
Adam

On Sat, Aug 17, 2019 at 9:52 AM Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 8/17/2019 3:27 AM, Alan Braslau wrote:
> > We have eofill in MP (in pdf/ps in fact) and that likely will do what
> you need.
> You forgot the MWD (Minimal Working Demo):
>
> \starttext
>
> \startMPpage
> path p ; p := fullcircle scaled 1cm ;
> path q ; q := fullcircle scaled .5cm ;
>
> nofill p ;
> eofill q ;
> \stopMPpage
>
> \stoptext
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>

[-- Attachment #1.2: Type: text/html, Size: 1580 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-17 18:12       ` Adam Reviczky
@ 2019-08-19 19:15         ` Jorge Manuel
  0 siblings, 0 replies; 23+ messages in thread
From: Jorge Manuel @ 2019-08-19 19:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Thanks a lot for the new features.


In my system this code don’t work.

macOS Mojave

This is LuaMetaTeX, Version 2.00.0
open source     > level 1, order 1, name 'cont-yes.mkiv'
system          >
system          > ConTeXt  ver: 2019.08.17 12:16 MKIV beta  fmt: 2019.8.19  int: English/English




\startMPcode{doublefun}
draw lmt_function [

    xmin =  0, xmax = 10, xstep = .05,
    ymin = -2, ymax =  2,

    xticks = "bottom", xsmall = 80, xlarge = 20,
    yticks = "left",   ysmall = 40, ylarge =  4,

    code = "1.5 * math.cosd(240 * math.sqrt(x))",

    xlabels = "yes",
    ylabels = "yes",

    ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
    xcaption = "\strut\tfd horizontal",

    pointsymbol = "dot", pointsize = 4, pointcolor = "orange",

    sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm,
]
    xsized 8cm
;
\stopMPcode

The output error:

loading metafun, including plain.mp version 1.004 for metafun iv and xl


pages           > flushing realpage 9, userpage 8, subpage 9
metapost log    > ! Missing ':' has been inserted.
metapost log    > <to be read again>
metapost log    >                    addto
metapost log    > draw->addto
metapost log    >            .currentpicture.if.picture(EXPR0):also(EXPR0)else:doublepath(EXPR…









___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Fwd:  metafun 2
       [not found]     ` <CAHy-LL9D5NB6qZYj+QynCWR-rqk6suD3reepLUgO8KOwrjwnXA@mail.gmail.com>
@ 2019-08-19 19:20       ` Mikael P. Sundqvist
  0 siblings, 0 replies; 23+ messages in thread
From: Mikael P. Sundqvist @ 2019-08-19 19:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2594 bytes --]

On Wed, Aug 14, 2019 at 5:37 PM Hans Hagen <j.hagen@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
intersections.
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 (
http://franko.github.io/graph-toolkit/contour.html).

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
>

Good!


>
> > Again, it is very nice that you work on extending MetaPost/MetaFun
> further!!
> wel, mp is ... fun (and these extension are somewhat challenging)
>
> Hans
>

Fun, indeed!

/Mikael

[-- Attachment #1.2: Type: text/html, Size: 3948 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-08-14  9:54 metafun 2 Hans Hagen
                   ` (3 preceding siblings ...)
  2019-08-16 23:31 ` Adam Reviczky
@ 2019-09-08  8:42 ` Aditya Mahajan
  2019-09-08 10:09   ` Otared Kavian
  4 siblings, 1 reply; 23+ messages in thread
From: Aditya Mahajan @ 2019-09-08  8:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 14 Aug 2019, Hans Hagen wrote:

> Hi,
>
> In the process of providing an additional (more abstract) interface to 
> some of the old and also new MetaFun code we wonder what kind of 
> features users would like to see.
>
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf

Finally got around to playing around with the new interface. Here is an 
example of how to define new key-value driven macros in metapost:

https://adityam.github.io/context-blog/post/new-metafun-interface/

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-09-08  8:42 ` Aditya Mahajan
@ 2019-09-08 10:09   ` Otared Kavian
  2019-09-08 14:54     ` Aditya Mahajan
  0 siblings, 1 reply; 23+ messages in thread
From: Otared Kavian @ 2019-09-08 10:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Aditya,

As usual you show us a very nice and very clear example to taech nice features of ConTeXt: thank you so much!

I wanted also to point out a typo on that page (two occurrences), namely "ploles" instead of "poles", in the explanations before the actual code.

Best regard: 

> On 8 Sep 2019, at 10:42, Aditya Mahajan <adityam@umich.edu> wrote:
> 
> On Wed, 14 Aug 2019, Hans Hagen wrote:
> 
>> Hi,
>> 
>> In the process of providing an additional (more abstract) interface to some of the old and also new MetaFun code we wonder what kind of features users would like to see.
>> 
>> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
> 
> Finally got around to playing around with the new interface. Here is an example of how to define new key-value driven macros in metapost:
> 
> https://adityam.github.io/context-blog/post/new-metafun-interface/
> 
> Aditya
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: metafun 2
  2019-09-08 10:09   ` Otared Kavian
@ 2019-09-08 14:54     ` Aditya Mahajan
  0 siblings, 0 replies; 23+ messages in thread
From: Aditya Mahajan @ 2019-09-08 14:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 8 Sep 2019, Otared Kavian wrote:

> Hi Aditya,
>
> I wanted also to point out a typo on that page (two occurrences), namely 
> "ploles" instead of "poles", in the explanations before the actual code.

Thanks. Fixed.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2019-09-08 14:54 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14  9:54 metafun 2 Hans Hagen
2019-08-14 10:18 ` Henri Menke
2019-08-14 11:16   ` Hans Hagen
2019-08-14 11:31     ` Floris van Manen
2019-08-14 11:53       ` Hans Hagen
2019-08-15  6:05   ` Arthur Reutenauer
2019-08-14 14:22 ` Otared Kavian
2019-08-14 14:49   ` Hans Hagen
2019-08-14 14:53   ` Aditya Mahajan
2019-08-14 14:58     ` Otared Kavian
2019-08-14 15:11       ` Wolfgang Schuster
2019-08-14 15:34       ` Hans Hagen
2019-08-14 14:58 ` Mikael P. Sundqvist
2019-08-14 15:37   ` Hans Hagen
     [not found]     ` <CAHy-LL9D5NB6qZYj+QynCWR-rqk6suD3reepLUgO8KOwrjwnXA@mail.gmail.com>
2019-08-19 19:20       ` Fwd: " Mikael P. Sundqvist
2019-08-16 23:31 ` Adam Reviczky
2019-08-17  1:27   ` Alan Braslau
2019-08-17  8:52     ` Hans Hagen
2019-08-17 18:12       ` Adam Reviczky
2019-08-19 19:15         ` Jorge Manuel
2019-09-08  8:42 ` Aditya Mahajan
2019-09-08 10:09   ` Otared Kavian
2019-09-08 14:54     ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).