On 10/14/2013 2:38 PM, Jean Magnan de Bornier wrote:
Hello all,
Is it possible to define a path in metapost-metafun using "function"? In the metafun manual (chapter on Functions) the examples shown are all of the type "draw function ...". I wonder if it is possible to define a path with a function ("picture" after draw doesn't allow that afaik)?
there are some helpers in the new graph module, but Alan has to give an example % least-squares "fit" to a polynomial % % example : % % path p[] ; % numeric a[] ; a0 := 1 ; a1 := .1 ; a2 := .01 ; a3 := .001 ; a4 := 0.0001 ; % p0 := makefunctionpath(0,5,10,polynomial_function(a,4,x)) ; (it fails here so I probably misunderstand it) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------