ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Request for metapost
@ 2013-12-21 11:50 DesdeChaves
  2013-12-22 14:57 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: DesdeChaves @ 2013-12-21 11:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I know that metapost can send the variables "version", "number", "string",
"point", "quad", "boolean" and "path" to Context.
"triplet" variable can't pass. It will be very usefull if metapost can send
a array to context.

\startMPcode

numeric x[];
for i = 1 upto 10: x[i]:=random; endfor

passvariable("array",x);
    passvariable("version","1.0") ;
    passvariable("number",x[1]) ;
    passvariable("string","whatever") ;
    passvariable("point",(1,2)) ;
passvariable("triplet",(1,2,3)) ;
    passvariable("quad",(1,2,3,4)) ;
    passvariable("boolean",false) ;
    passvariable("path",fullcircle scaled 1cm) ;


\stopMPcode

\ctxluacode{inspect(metapost.variables)}

\ctxcommand{mprunvar("array")}


Thanks in advance

Jorge

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Request for metapost
  2013-12-21 11:50 Request for metapost DesdeChaves
@ 2013-12-22 14:57 ` Hans Hagen
  2013-12-22 18:10   ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2013-12-22 14:57 UTC (permalink / raw)
  To: ntg-context

On 12/21/2013 12:50 PM, DesdeChaves wrote:
>
> I know that metapost can send the variables "version", "number",
> "string", "point", "quad", "boolean" and "path" to Context.
> "triplet" variable can't pass. It will be very usefull if metapost can
> send a array to context.
>
> \startMPcode
>
> numeric x[];
> for i = 1 upto 10: x[i]:=random; endfor
>
> passvariable("array",x);
>      passvariable("version","1.0") ;
>      passvariable("number",x[1]) ;
>      passvariable("string","whatever") ;
>      passvariable("point",(1,2)) ;
> passvariable("triplet",(1,2,3)) ;
>      passvariable("quad",(1,2,3,4)) ;
>      passvariable("boolean",false) ;
>      passvariable("path",fullcircle scaled 1cm) ;
>
>
> \stopMPcode
>
> \ctxluacode{inspect(metapost.variables)}
>
> \ctxcommand{mprunvar("array")}
>
> Thanks in advance

that's less trivial (as automatism) so i provide passarrayvariable now 
(next beta) ... of course the next request would concern complex arrays 
so i also made a more low level flusher

\starttext

\startMPcode
     numeric n[]   ; for i=1 upto 10: n[i] := i + 1 ; endfor ;
     path    p[]   ; for i=1 upto 10: p[i] := fullcircle scaled (i*cm) ; 
endfor ;
     numeric n[][] ; for i=1,4 : for j=1,3 : n[i][j] = uniformdeviate(1) 
; endfor ; endfor ;

     passvariable("x",12345) ;
     passarrayvariable("n-array",n,1,7,1) ;
     passarrayvariable("p-array",p,1,7,1) ;
     passvariable("p",(1,1) .. (2,2)) ;

     % watch out: no ; in between

     startpassingvariable("b")
         startarray
             for i=1,4 :
                 startarray
                     for j=1,3 :
                         value(n[i][j])
                     endfor
                 stoparray
             endfor
         stoparray
     stoppassingvariable ;

     startpassingvariable("a")
         starthash
             key("test1")
                 startarray
                     value(123)
                     value(456)
                 stoparray
             key("test2")
                 starthash
                     key("test")
                     value(789)
                 stophash
         stophash
     stoppassingvariable ;

     draw fullcircle scaled 1cm ;
\stopMPcode

\ctxluacode{inspect(metapost.variables)}

\ctxcommand{mprunvar("x")}

\stoptext

-----------------------------------------------------------------
                                           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] 7+ messages in thread

* Re: Request for metapost
  2013-12-22 14:57 ` Hans Hagen
@ 2013-12-22 18:10   ` Hans Hagen
  2013-12-23 14:31     ` DesdeChaves
  2013-12-25 14:53     ` Peter Rolf
  0 siblings, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2013-12-22 18:10 UTC (permalink / raw)
  To: ntg-context

On 12/22/2013 3:57 PM, Hans Hagen wrote:
> On 12/21/2013 12:50 PM, DesdeChaves wrote:
>>
>> I know that metapost can send the variables "version", "number",
>> "string", "point", "quad", "boolean" and "path" to Context.
>> "triplet" variable can't pass. It will be very usefull if metapost can
>> send a array to context.
>>
>> \startMPcode
>>
>> numeric x[];
>> for i = 1 upto 10: x[i]:=random; endfor
>>
>> passvariable("array",x);
>>      passvariable("version","1.0") ;
>>      passvariable("number",x[1]) ;
>>      passvariable("string","whatever") ;
>>      passvariable("point",(1,2)) ;
>> passvariable("triplet",(1,2,3)) ;
>>      passvariable("quad",(1,2,3,4)) ;
>>      passvariable("boolean",false) ;
>>      passvariable("path",fullcircle scaled 1cm) ;
>>
>>
>> \stopMPcode
>>
>> \ctxluacode{inspect(metapost.variables)}
>>
>> \ctxcommand{mprunvar("array")}
>>
>> Thanks in advance
>
> that's less trivial (as automatism) so i provide passarrayvariable now
> (next beta) ... of course the next request would concern complex arrays
> so i also made a more low level flusher
>
> \starttext
>
> \startMPcode
>      numeric n[]   ; for i=1 upto 10: n[i] := i + 1 ; endfor ;
>      path    p[]   ; for i=1 upto 10: p[i] := fullcircle scaled (i*cm) ;
> endfor ;
>      numeric n[][] ; for i=1,4 : for j=1,3 : n[i][j] = uniformdeviate(1)
> ; endfor ; endfor ;
>
>      passvariable("x",12345) ;
>      passarrayvariable("n-array",n,1,7,1) ;
>      passarrayvariable("p-array",p,1,7,1) ;
>      passvariable("p",(1,1) .. (2,2)) ;
>
>      % watch out: no ; in between
>
>      startpassingvariable("b")
>          startarray
>              for i=1,4 :
>                  startarray
>                      for j=1,3 :
>                          value(n[i][j])
>                      endfor
>                  stoparray
>              endfor
>          stoparray
>      stoppassingvariable ;
>
>      startpassingvariable("a")
>          starthash
>              key("test1")
>                  startarray
>                      value(123)
>                      value(456)
>                  stoparray
>              key("test2")
>                  starthash
>                      key("test")
>                      value(789)
>                  stophash
>          stophash
>      stoppassingvariable ;
>
>      draw fullcircle scaled 1cm ;
> \stopMPcode
>
> \ctxluacode{inspect(metapost.variables)}
>
> \ctxcommand{mprunvar("x")}
>
> \stoptext

\starttext

% \enabletrackers[metapost.variables]

\startMPcode
     numeric n[]   ; for i=1 upto 10: n[i] := 1/i ; endfor ;
     path    p[]   ; for i=1 upto 10: p[i] := fullcircle xyscaled 
(cm*i,cm/i) ; endfor ;
     numeric r[][] ; for i=1 upto 4 : for j=1 upto 3 : r[i][j] := 
uniformdeviate(1) ; endfor ; endfor ;
     pair    u[][] ; for i=1 step 0.5 until 4 : for j=1 step 0.1 until 2 
: u[i][j] := (i,j) ; endfor ; endfor ;

     passvariable("x",12345) ;
     passarrayvariable("n-array",n,1,7,1) ;
     passarrayvariable("p-array",p,1,7,1) ;
     passvariable("p",(1,1) .. (2,2)) ;

     startpassingvariable("b")
         startarray
             for i=1 upto 4 :
                 startarray
                     for j=1 upto 3 :
                         value(r[i][j])
                     endfor
                 stoparray
             endfor
         stoparray
     stoppassingvariable ;

     startpassingvariable("a")
         starthash
             key("test 1")
                 startarray
                     value(123)
                     value(456)
                 stoparray
             key("test 2")
                 startarray
                     index(0)
                     value(123)
                     value(456)
                     value(789)
                     slot(999,987)
                 stoparray
             key("test 3")
                 starthash
                     key("first") value(789)
                     entry("second",987)
                 stophash
         stophash
     stoppassingvariable ;

     startpassingvariable("c")
         startarray
             for i=1 step 0.5 until 4 :
                 index(i)
                 startarray
                     for j=1 step 0.1 until 2 :
                         slot(j,u[i][j])
                     endfor
                 stoparray
             endfor
         stoparray
     stoppassingvariable ;

     draw fullcircle scaled 1cm ;
\stopMPcode

\ctxluacode{inspect(metapost.variables)}

\ctxcommand{mprunvar("x")}

\stoptext



-----------------------------------------------------------------
                                           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] 7+ messages in thread

* Re: Request for metapost
  2013-12-22 18:10   ` Hans Hagen
@ 2013-12-23 14:31     ` DesdeChaves
  2013-12-23 15:52       ` DesdeChaves
  2013-12-25 14:53     ` Peter Rolf
  1 sibling, 1 reply; 7+ messages in thread
From: DesdeChaves @ 2013-12-23 14:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Thanks very much for your support.

Jorge


2013/12/22 Hans Hagen <pragma@wxs.nl>

> On 12/22/2013 3:57 PM, Hans Hagen wrote:
>
>> On 12/21/2013 12:50 PM, DesdeChaves wrote:
>>
>>>
>>> I know that metapost can send the variables "version", "number",
>>> "string", "point", "quad", "boolean" and "path" to Context.
>>> "triplet" variable can't pass. It will be very usefull if metapost can
>>> send a array to context.
>>>
>>> \startMPcode
>>>
>>> numeric x[];
>>> for i = 1 upto 10: x[i]:=random; endfor
>>>
>>> passvariable("array",x);
>>>      passvariable("version","1.0") ;
>>>      passvariable("number",x[1]) ;
>>>      passvariable("string","whatever") ;
>>>      passvariable("point",(1,2)) ;
>>> passvariable("triplet",(1,2,3)) ;
>>>      passvariable("quad",(1,2,3,4)) ;
>>>      passvariable("boolean",false) ;
>>>      passvariable("path",fullcircle scaled 1cm) ;
>>>
>>>
>>> \stopMPcode
>>>
>>> \ctxluacode{inspect(metapost.variables)}
>>>
>>> \ctxcommand{mprunvar("array")}
>>>
>>> Thanks in advance
>>>
>>
>> that's less trivial (as automatism) so i provide passarrayvariable now
>> (next beta) ... of course the next request would concern complex arrays
>> so i also made a more low level flusher
>>
>> \starttext
>>
>> \startMPcode
>>      numeric n[]   ; for i=1 upto 10: n[i] := i + 1 ; endfor ;
>>      path    p[]   ; for i=1 upto 10: p[i] := fullcircle scaled (i*cm) ;
>> endfor ;
>>      numeric n[][] ; for i=1,4 : for j=1,3 : n[i][j] = uniformdeviate(1)
>> ; endfor ; endfor ;
>>
>>      passvariable("x",12345) ;
>>      passarrayvariable("n-array",n,1,7,1) ;
>>      passarrayvariable("p-array",p,1,7,1) ;
>>      passvariable("p",(1,1) .. (2,2)) ;
>>
>>      % watch out: no ; in between
>>
>>      startpassingvariable("b")
>>          startarray
>>              for i=1,4 :
>>                  startarray
>>                      for j=1,3 :
>>                          value(n[i][j])
>>                      endfor
>>                  stoparray
>>              endfor
>>          stoparray
>>      stoppassingvariable ;
>>
>>      startpassingvariable("a")
>>          starthash
>>              key("test1")
>>                  startarray
>>                      value(123)
>>                      value(456)
>>                  stoparray
>>              key("test2")
>>                  starthash
>>                      key("test")
>>                      value(789)
>>                  stophash
>>          stophash
>>      stoppassingvariable ;
>>
>>      draw fullcircle scaled 1cm ;
>> \stopMPcode
>>
>> \ctxluacode{inspect(metapost.variables)}
>>
>> \ctxcommand{mprunvar("x")}
>>
>> \stoptext
>>
>
> \starttext
>
> % \enabletrackers[metapost.variables]
>
> \startMPcode
>     numeric n[]   ; for i=1 upto 10: n[i] := 1/i ; endfor ;
>     path    p[]   ; for i=1 upto 10: p[i] := fullcircle xyscaled
> (cm*i,cm/i) ; endfor ;
>     numeric r[][] ; for i=1 upto 4 : for j=1 upto 3 : r[i][j] :=
> uniformdeviate(1) ; endfor ; endfor ;
>     pair    u[][] ; for i=1 step 0.5 until 4 : for j=1 step 0.1 until 2 :
> u[i][j] := (i,j) ; endfor ; endfor ;
>
>
>     passvariable("x",12345) ;
>     passarrayvariable("n-array",n,1,7,1) ;
>     passarrayvariable("p-array",p,1,7,1) ;
>     passvariable("p",(1,1) .. (2,2)) ;
>
>     startpassingvariable("b")
>         startarray
>             for i=1 upto 4 :
>                 startarray
>                     for j=1 upto 3 :
>                         value(r[i][j])
>
>                     endfor
>                 stoparray
>             endfor
>         stoparray
>     stoppassingvariable ;
>
>     startpassingvariable("a")
>         starthash
>             key("test 1")
>
>                 startarray
>                     value(123)
>                     value(456)
>                 stoparray
>             key("test 2")
>                 startarray
>                     index(0)
>                     value(123)
>                     value(456)
>                     value(789)
>                     slot(999,987)
>                 stoparray
>             key("test 3")
>                 starthash
>                     key("first") value(789)
>                     entry("second",987)
>                 stophash
>         stophash
>     stoppassingvariable ;
>
>     startpassingvariable("c")
>         startarray
>             for i=1 step 0.5 until 4 :
>                 index(i)
>                 startarray
>                     for j=1 step 0.1 until 2 :
>                         slot(j,u[i][j])
>
>                     endfor
>                 stoparray
>             endfor
>         stoparray
>     stoppassingvariable ;
>
>     draw fullcircle scaled 1cm ;
> \stopMPcode
>
> \ctxluacode{inspect(metapost.variables)}
>
> \ctxcommand{mprunvar("x")}
>
> \stoptext
>
>
>
> -----------------------------------------------------------------
>                                           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
> ____________________________________________________________
> _______________________
>



-- 
Atentamente

DesdeChaves

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Request for metapost
  2013-12-23 14:31     ` DesdeChaves
@ 2013-12-23 15:52       ` DesdeChaves
  2013-12-23 16:21         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: DesdeChaves @ 2013-12-23 15:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Three ways to generate poisson data. Thanks for Hans Hagen, Alan Braslou
and Anthony Phan.

Jorge


2013/12/23 DesdeChaves <desdechaves@gmail.com>

> Thanks very much for your support.
>
> Jorge
>
>
> 2013/12/22 Hans Hagen <pragma@wxs.nl>
>
>> On 12/22/2013 3:57 PM, Hans Hagen wrote:
>>
>>> On 12/21/2013 12:50 PM, DesdeChaves wrote:
>>>
>>>>
>>>> I know that metapost can send the variables "version", "number",
>>>> "string", "point", "quad", "boolean" and "path" to Context.
>>>> "triplet" variable can't pass. It will be very usefull if metapost can
>>>> send a array to context.
>>>>
>>>> \startMPcode
>>>>
>>>> numeric x[];
>>>> for i = 1 upto 10: x[i]:=random; endfor
>>>>
>>>> passvariable("array",x);
>>>>      passvariable("version","1.0") ;
>>>>      passvariable("number",x[1]) ;
>>>>      passvariable("string","whatever") ;
>>>>      passvariable("point",(1,2)) ;
>>>> passvariable("triplet",(1,2,3)) ;
>>>>      passvariable("quad",(1,2,3,4)) ;
>>>>      passvariable("boolean",false) ;
>>>>      passvariable("path",fullcircle scaled 1cm) ;
>>>>
>>>>
>>>> \stopMPcode
>>>>
>>>> \ctxluacode{inspect(metapost.variables)}
>>>>
>>>> \ctxcommand{mprunvar("array")}
>>>>
>>>> Thanks in advance
>>>>
>>>
>>> that's less trivial (as automatism) so i provide passarrayvariable now
>>> (next beta) ... of course the next request would concern complex arrays
>>> so i also made a more low level flusher
>>>
>>> \starttext
>>>
>>> \startMPcode
>>>      numeric n[]   ; for i=1 upto 10: n[i] := i + 1 ; endfor ;
>>>      path    p[]   ; for i=1 upto 10: p[i] := fullcircle scaled (i*cm) ;
>>> endfor ;
>>>      numeric n[][] ; for i=1,4 : for j=1,3 : n[i][j] = uniformdeviate(1)
>>> ; endfor ; endfor ;
>>>
>>>      passvariable("x",12345) ;
>>>      passarrayvariable("n-array",n,1,7,1) ;
>>>      passarrayvariable("p-array",p,1,7,1) ;
>>>      passvariable("p",(1,1) .. (2,2)) ;
>>>
>>>      % watch out: no ; in between
>>>
>>>      startpassingvariable("b")
>>>          startarray
>>>              for i=1,4 :
>>>                  startarray
>>>                      for j=1,3 :
>>>                          value(n[i][j])
>>>                      endfor
>>>                  stoparray
>>>              endfor
>>>          stoparray
>>>      stoppassingvariable ;
>>>
>>>      startpassingvariable("a")
>>>          starthash
>>>              key("test1")
>>>                  startarray
>>>                      value(123)
>>>                      value(456)
>>>                  stoparray
>>>              key("test2")
>>>                  starthash
>>>                      key("test")
>>>                      value(789)
>>>                  stophash
>>>          stophash
>>>      stoppassingvariable ;
>>>
>>>      draw fullcircle scaled 1cm ;
>>> \stopMPcode
>>>
>>> \ctxluacode{inspect(metapost.variables)}
>>>
>>> \ctxcommand{mprunvar("x")}
>>>
>>> \stoptext
>>>
>>
>> \starttext
>>
>> % \enabletrackers[metapost.variables]
>>
>> \startMPcode
>>     numeric n[]   ; for i=1 upto 10: n[i] := 1/i ; endfor ;
>>     path    p[]   ; for i=1 upto 10: p[i] := fullcircle xyscaled
>> (cm*i,cm/i) ; endfor ;
>>     numeric r[][] ; for i=1 upto 4 : for j=1 upto 3 : r[i][j] :=
>> uniformdeviate(1) ; endfor ; endfor ;
>>     pair    u[][] ; for i=1 step 0.5 until 4 : for j=1 step 0.1 until 2 :
>> u[i][j] := (i,j) ; endfor ; endfor ;
>>
>>
>>     passvariable("x",12345) ;
>>     passarrayvariable("n-array",n,1,7,1) ;
>>     passarrayvariable("p-array",p,1,7,1) ;
>>     passvariable("p",(1,1) .. (2,2)) ;
>>
>>     startpassingvariable("b")
>>         startarray
>>             for i=1 upto 4 :
>>                 startarray
>>                     for j=1 upto 3 :
>>                         value(r[i][j])
>>
>>                     endfor
>>                 stoparray
>>             endfor
>>         stoparray
>>     stoppassingvariable ;
>>
>>     startpassingvariable("a")
>>         starthash
>>             key("test 1")
>>
>>                 startarray
>>                     value(123)
>>                     value(456)
>>                 stoparray
>>             key("test 2")
>>                 startarray
>>                     index(0)
>>                     value(123)
>>                     value(456)
>>                     value(789)
>>                     slot(999,987)
>>                 stoparray
>>             key("test 3")
>>                 starthash
>>                     key("first") value(789)
>>                     entry("second",987)
>>                 stophash
>>         stophash
>>     stoppassingvariable ;
>>
>>     startpassingvariable("c")
>>         startarray
>>             for i=1 step 0.5 until 4 :
>>                 index(i)
>>                 startarray
>>                     for j=1 step 0.1 until 2 :
>>                         slot(j,u[i][j])
>>
>>                     endfor
>>                 stoparray
>>             endfor
>>         stoparray
>>     stoppassingvariable ;
>>
>>     draw fullcircle scaled 1cm ;
>> \stopMPcode
>>
>> \ctxluacode{inspect(metapost.variables)}
>>
>> \ctxcommand{mprunvar("x")}
>>
>> \stoptext
>>
>>
>>
>> -----------------------------------------------------------------
>>                                           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
>> ____________________________________________________________
>> _______________________
>>
>
>
>
> --
> Atentamente
>
> DesdeChaves
>



-- 
Atentamente

DesdeChaves

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

[-- Attachment #2: poisson3.pdf --]
[-- Type: application/pdf, Size: 26126 bytes --]

[-- Attachment #3: poisson3.tex --]
[-- Type: application/x-tex, Size: 3428 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Request for metapost
  2013-12-23 15:52       ` DesdeChaves
@ 2013-12-23 16:21         ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2013-12-23 16:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 12/23/2013 4:52 PM, DesdeChaves wrote:
> Three ways to generate poisson data. Thanks for Hans Hagen, Alan Braslou
> and Anthony Phan.

as you use swig you can also put your library in

<root>/tex/texmf-linux-64/bin/lib/luatex/lua/swiglib/randist/core.so

and then (given that you've run mtxrun --generate):

local rl = swiglib("randist")

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] 7+ messages in thread

* Re: Request for metapost
  2013-12-22 18:10   ` Hans Hagen
  2013-12-23 14:31     ` DesdeChaves
@ 2013-12-25 14:53     ` Peter Rolf
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Rolf @ 2013-12-25 14:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Also thanks from my side. Just what I needed for further tests (graphics
with multiple paths).

Peter


Am 22.12.2013 19:10, schrieb Hans Hagen:
> \starttext
> 
> % \enabletrackers[metapost.variables]
> 
> \startMPcode
>     numeric n[]   ; for i=1 upto 10: n[i] := 1/i ; endfor ;
>     path    p[]   ; for i=1 upto 10: p[i] := fullcircle xyscaled
> (cm*i,cm/i) ; endfor ;
>     numeric r[][] ; for i=1 upto 4 : for j=1 upto 3 : r[i][j] :=
> uniformdeviate(1) ; endfor ; endfor ;
>     pair    u[][] ; for i=1 step 0.5 until 4 : for j=1 step 0.1 until 2
> : u[i][j] := (i,j) ; endfor ; endfor ;
> 
>     passvariable("x",12345) ;
>     passarrayvariable("n-array",n,1,7,1) ;
>     passarrayvariable("p-array",p,1,7,1) ;
>     passvariable("p",(1,1) .. (2,2)) ;
> 
>     startpassingvariable("b")
>         startarray
>             for i=1 upto 4 :
>                 startarray
>                     for j=1 upto 3 :
>                         value(r[i][j])
>                     endfor
>                 stoparray
>             endfor
>         stoparray
>     stoppassingvariable ;
> 
>     startpassingvariable("a")
>         starthash
>             key("test 1")
>                 startarray
>                     value(123)
>                     value(456)
>                 stoparray
>             key("test 2")
>                 startarray
>                     index(0)
>                     value(123)
>                     value(456)
>                     value(789)
>                     slot(999,987)
>                 stoparray
>             key("test 3")
>                 starthash
>                     key("first") value(789)
>                     entry("second",987)
>                 stophash
>         stophash
>     stoppassingvariable ;
> 
>     startpassingvariable("c")
>         startarray
>             for i=1 step 0.5 until 4 :
>                 index(i)
>                 startarray
>                     for j=1 step 0.1 until 2 :
>                         slot(j,u[i][j])
>                     endfor
>                 stoparray
>             endfor
>         stoparray
>     stoppassingvariable ;
> 
>     draw fullcircle scaled 1cm ;
> \stopMPcode
> 
> \ctxluacode{inspect(metapost.variables)}
> 
> \ctxcommand{mprunvar("x")}
> 
> \stoptext

___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2013-12-25 14:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-21 11:50 Request for metapost DesdeChaves
2013-12-22 14:57 ` Hans Hagen
2013-12-22 18:10   ` Hans Hagen
2013-12-23 14:31     ` DesdeChaves
2013-12-23 15:52       ` DesdeChaves
2013-12-23 16:21         ` Hans Hagen
2013-12-25 14:53     ` Peter Rolf

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