* MetaPost Examples
@ 2021-09-01 12:19 Henning Hraban Ramm via ntg-context
2021-09-01 12:45 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-09-01 12:19 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to ConTeXt and would like to avoid the doubling of MP code like:
\startMP
path p;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopMP
\startMPcode
path p;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopMPcode
I’m quite sure there’s a possibility with buffers, but how?
\startbuffer
path p;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopbuffer
\typebuffer
... and then how do I get the MP graphic?
Hraban
*) https://github.com/jemmybutton/fiziko
___________________________________________________________________________________
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] 6+ messages in thread
* Re: MetaPost Examples
2021-09-01 12:19 MetaPost Examples Henning Hraban Ramm via ntg-context
@ 2021-09-01 12:45 ` Hans Hagen via ntg-context
2021-09-01 13:50 ` Henning Hraban Ramm via ntg-context
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2021-09-01 12:45 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
On 9/1/2021 2:19 PM, Henning Hraban Ramm via ntg-context wrote:
> Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to ConTeXt and would like to avoid the doubling of MP code like:
>
> \startMP
> path p;
> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
> \stopMP
>
> \startMPcode
> path p;
> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
> \stopMPcode
>
> I’m quite sure there’s a possibility with buffers, but how?
>
> \startbuffer
> path p;
> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
> \stopbuffer
>
> \typebuffer
>
> ... and then how do I get the MP graphic?
\processMPbuffer
-----------------------------------------------------------------
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] 6+ messages in thread
* Re: MetaPost Examples
2021-09-01 12:45 ` Hans Hagen via ntg-context
@ 2021-09-01 13:50 ` Henning Hraban Ramm via ntg-context
0 siblings, 0 replies; 6+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-09-01 13:50 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
> Am 01.09.2021 um 14:45 schrieb Hans Hagen via ntg-context <ntg-context@ntg.nl>:
>
> On 9/1/2021 2:19 PM, Henning Hraban Ramm via ntg-context wrote:
>> Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to ConTeXt and would like to avoid the doubling of MP code like:
>> \startMP
>> path p;
>> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopMP
>> \startMPcode
>> path p;
>> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopMPcode
>> I’m quite sure there’s a possibility with buffers, but how?
>> \startbuffer
>> path p;
>> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopbuffer
>> \typebuffer
>> ... and then how do I get the MP graphic?
> \processMPbuffer
“of course”
Thank you!
Used here: https://github.com/fiee/fiziko/blob/master/fiziko.mkiv
Hraban
___________________________________________________________________________________
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] 6+ messages in thread
* metapost examples
@ 2001-08-24 14:06 Patrick Gundlach
2001-08-24 20:58 ` Arun Mangalam
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Gundlach @ 2001-08-24 14:06 UTC (permalink / raw)
Hi,
I haven't cought up reading the mailing list for a few weeks
now. Maybe this has already been announced. I have found the
following url at a ctan announcement:
http://www.math.jussieu.fr/~zoonek/LaTeX/Metapost/metapost.html
a *lot* of metapost examples!
Viele Grüße,
Patrick Gundlach
- I TeX, therefore I am -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: metapost examples
2001-08-24 14:06 metapost examples Patrick Gundlach
@ 2001-08-24 20:58 ` Arun Mangalam
0 siblings, 0 replies; 6+ messages in thread
From: Arun Mangalam @ 2001-08-24 20:58 UTC (permalink / raw)
Cc: ConTeXt Mailing List
Hello,
If I am remember right the URL below has many neat examples of metapost,
BUT remember you cannot blindly cut-and-paste, since some of the
variables used in one figure may be defined in a previous figure...
Other than that, those examples are very nice . :)
- Arun
On Friday, August 24, 2001, at 10:06 AM, Patrick Gundlach wrote:
> Hi,
>
> I haven't cought up reading the mailing list for a few weeks
> now. Maybe this has already been announced. I have found the
> following url at a ctan announcement:
>
>
> http://www.math.jussieu.fr/~zoonek/LaTeX/Metapost/metapost.html
>
> a *lot* of metapost examples!
>
>
>
> Viele Grüße,
>
> Patrick Gundlach
>
>
> - I TeX, therefore I am -
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* metapost examples
@ 2001-04-29 18:50 Marc van Dongen
0 siblings, 0 replies; 6+ messages in thread
From: Marc van Dongen @ 2001-04-29 18:50 UTC (permalink / raw)
Hi there,
I've put a few metapost examples on-line.
http://www.cs.ucc.ie/~dongen/mpost/mpost.html
This is by far not as much and sophisticated
as what other members of this forum have
on-line but the examples are different. Time
willing this selection will increase.
Examples include:
* A Proof of Pythagoras' Theorem.
* Fibonacci numbers.
* Hilbert curves.
* Two drawings inspired by Escher.
* Two examples inspired by Mondriaan.
* A graph example.
* An example of the microstructure of a CSP.
* An example of a tree.
* Some fun with stars and related graphs.
It is my intention to put some more information
and metapost links on this ``site.'' Comments
appreciated.
Regards,
Marc van Dongen
--
Marc van Dongen, CS Dept | phone: +353 21 4903578
University College Cork, NUIC | Fax: +353 21 4903113
College Road, Cork, Ireland | Email: dongen@cs.ucc.ie
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-01 13:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 12:19 MetaPost Examples Henning Hraban Ramm via ntg-context
2021-09-01 12:45 ` Hans Hagen via ntg-context
2021-09-01 13:50 ` Henning Hraban Ramm via ntg-context
-- strict thread matches above, loose matches on Subject: below --
2001-08-24 14:06 metapost examples Patrick Gundlach
2001-08-24 20:58 ` Arun Mangalam
2001-04-29 18:50 Marc van Dongen
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).