ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* functions and paths in metapost
@ 2013-10-14 12:38 Jean Magnan de Bornier
  2013-10-14 20:56 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Magnan de Bornier @ 2013-10-14 12:38 UTC (permalink / raw)
  To: ntg-context

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)?

tia,
(mkiv)
-- 
Jean
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: functions and paths in metapost
  2013-10-14 12:38 functions and paths in metapost Jean Magnan de Bornier
@ 2013-10-14 20:56 ` Hans Hagen
  2013-10-15 16:59   ` Jean Magnan de Bornier
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2013-10-14 20:56 UTC (permalink / raw)
  To: ntg-context, Alan BRASLAU

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
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: functions and paths in metapost
  2013-10-14 20:56 ` Hans Hagen
@ 2013-10-15 16:59   ` Jean Magnan de Bornier
  2013-10-15 17:05     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Magnan de Bornier @ 2013-10-15 16:59 UTC (permalink / raw)
  To: ntg-context

Le 14 octobre à 22:56:59 Hans Hagen <pragma@wxs.nl> écrit notamment:

| 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)
>

I could not find this module ? (I always update with --modules=all)
-- 
Jean
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: functions and paths in metapost
  2013-10-15 16:59   ` Jean Magnan de Bornier
@ 2013-10-15 17:05     ` Hans Hagen
  2013-10-15 20:30       ` Alan BRASLAU
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2013-10-15 17:05 UTC (permalink / raw)
  To: ntg-context, Alan BRASLAU

On 10/15/2013 6:59 PM, Jean Magnan de Bornier wrote:
> Le 14 octobre à 22:56:59 Hans Hagen <pragma@wxs.nl> écrit notamment:
>
> | 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)
>>
>
> I could not find this module ? (I always update with --modules=all)

mp-grap.mpiv

but Alan has to show how to use that feature (outside graph)

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
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: functions and paths in metapost
  2013-10-15 17:05     ` Hans Hagen
@ 2013-10-15 20:30       ` Alan BRASLAU
  0 siblings, 0 replies; 5+ messages in thread
From: Alan BRASLAU @ 2013-10-15 20:30 UTC (permalink / raw)
  To: ntg-context; +Cc: Jean Magnan de Bornier

On Tue, 15 Oct 2013 19:05:19 +0200
Hans Hagen <pragma@wxs.nl> wrote:

> On 10/15/2013 6:59 PM, Jean Magnan de Bornier wrote:
> > Le 14 octobre à 22:56:59 Hans Hagen <pragma@wxs.nl> écrit notamment:
> >
> > | 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)
> >>
> >
> > I could not find this module ? (I always update with --modules=all)
> 
> mp-grap.mpiv
> 
> but Alan has to show how to use that feature (outside graph)

This only will work within the graph environment and using the double
precision mathematical model.

The updated graph documentation is close to being released - promised
for the proceedings for the last ConTeXt meeting.

Alan
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2013-10-15 20:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-14 12:38 functions and paths in metapost Jean Magnan de Bornier
2013-10-14 20:56 ` Hans Hagen
2013-10-15 16:59   ` Jean Magnan de Bornier
2013-10-15 17:05     ` Hans Hagen
2013-10-15 20:30       ` Alan BRASLAU

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).