From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/104802 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Adam Reviczky Newsgroups: gmane.comp.tex.context Subject: Re: metafun 2 Date: Sat, 17 Aug 2019 00:31:38 +0100 Message-ID: References: <174f2ea4-37ef-046c-198b-a9c7b3912e4a@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8307212451253490704==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="226890"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 17 01:32:48 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyli8-000wrr-Bq for gctc-ntg-context-518@m.gmane.org; Sat, 17 Aug 2019 01:32:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3BB72153583; Sat, 17 Aug 2019 01:32:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qqL3xQjBLqL6; Sat, 17 Aug 2019 01:32:28 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DE376153604; Sat, 17 Aug 2019 01:32:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4F2BD153583 for ; Sat, 17 Aug 2019 01:32:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tJ9L_Y06LT5S for ; Sat, 17 Aug 2019 01:32:24 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.51; helo=mail-ed1-f51.google.com; envelope-from=reviczky@gmail.com; receiver= Original-Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 523F9152C7C for ; Sat, 17 Aug 2019 01:32:24 +0200 (CEST) Original-Received: by mail-ed1-f51.google.com with SMTP id r12so6486237edo.5 for ; Fri, 16 Aug 2019 16:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=yrHcksIjsMM+2C20foB8k5ePI6dr0Sf5D/HzeCYxN8c=; b=hGXGQ06HBOkJ2yPxDTP/6NhBJt5vD3tXSPOoOHCIQ7SqudBjgwFcdjYFb0S2T4s1bE TfRpGDyWhmljE2kxAZGDziuLM447V3b8flu9UahNzUNL2tVqJesxQhmRVmnbFN3r23Xd yP1ghD10oxdbpwKZq2qEgKdkCHPLxu3uW7QfvRTDJGEOfzi+3yiundv+EGqOJZTjN7WU DifeGdgMzOHuDV5pwB2lXRTcsYCxrTELiI/0Umkcga4PsN4XkJGiEBIN/L0lvpRNZY04 ldRwaRrKKJwqP0YhiI1IQVZbByOSEYRqv6uRDwv73Xlst7pG4IdT3Gu+X2lCtCdx8yLd wgCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=yrHcksIjsMM+2C20foB8k5ePI6dr0Sf5D/HzeCYxN8c=; b=CooAAXMSveEjLPiB6A4qwD7KPUXEdsoTMIQOh3QW8BX0RaWCDGb1T6JN2YbPIOvARA lVyVxqgLdfSSB+RSxZmx7k6M9DN32QtMfAdkB065x/5pV+CxCtpD9rllxug6xGn+WqxX eGeDbGVWirkiCkmkRhP2ltmHIWVe8sfZ8i++Yqwfole7PFNayACIoWrRQPHDPvBVBV1J lbspaaOho9j5ljhIKK+dB24qOztUoJZYqnUqBXuFjI6vJC530KAPZ81RA7i3YNevhQ26 jtNBFycVT8wLR5DMA+MDKODl+G8s9Z2l45XIPRgVx9nfS/oiZz4A3WUK1ioS5PjZP6VS ZD0A== X-Gm-Message-State: APjAAAXDy7KmvqJNhSwfOPTMWiSBfY7xR6L01pFnLFLFsl92DezTi4ji khrHypRoW+ztzSFVNNEYpdhA5nWJ4Y7P1JszAdXePUXB X-Google-Smtp-Source: APXvYqzXxQep01mkHpny04DDoGwlOkFCo8DhIKdc1Re3xxM9zEDVcVvUKSpmDxcvNnhOQiFXIxu8u7A8WlNF/BZcd9w= X-Received: by 2002:a17:906:b29a:: with SMTP id q26mr11367736ejz.144.1565998343706; Fri, 16 Aug 2019 16:32:23 -0700 (PDT) In-Reply-To: <174f2ea4-37ef-046c-198b-a9c7b3912e4a@xs4all.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:104802 Archived-At: --===============8307212451253490704== Content-Type: multipart/alternative; boundary="000000000000fedb6a0590446608" --000000000000fedb6a0590446608 Content-Type: text/plain; charset="UTF-8" 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 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 > > ___________________________________________________________________________________ > --000000000000fedb6a0590446608 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hans,

One MetaPost featur= e 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.<= /div>

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

<= /div>

Just for illustration purposes, if I wanted to fill the area in betw= een two circles:
path p ;
p :=3D fullcircle scaled 1cm ;
path q ;
q :=3D fullcircle scaled .5cm ;
Instead of creating a new path along both circles with= :
r :=3D p -- reverse q -- cycle ;
It would be nice to have something like:
fill p excludi=
ng q ;
or something like that.

I mainly h= ave use-cases for differences in shapes, but filling the intersection of tw= o shapes would be the same idea.

Thanks,
Adam


=
On Wed, Aug 14, 2019 at 10:57 AM Hans= Hagen <j.hagen@x= s4all.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/magaz= ines/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 <= br> ConTeXt LMTX here. For instance,

=C2=A0 =C2=A0 =C2=A0draw lmt_outline [
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0content=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D &qu= ot;hello",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kind=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =3D "reverse",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fillcolor=C2=A0 =C2=A0 =C2=A0=3D "da= rkred",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0drawcolor=C2=A0 =C2=A0 =C2=A0=3D "da= rkblue",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rulethickness =3D 1/2,
=C2=A0 =C2=A0 =C2=A0] 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:

=C2=A0 =C2=A0 =C2=A0draw lmt_followtext [
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0content =3D "How well does it work {= \bf 1}! ",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0path=C2=A0 =C2=A0 =3D (fullcircle scaled = 4cm),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trace=C2=A0 =C2=A0=3D true,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0spread=C2=A0 =3D true,
=C2=A0 =C2=A0 =C2=A0] ysized 5cm ;

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

=C2=A0 =C2=A0 =C2=A0draw lmt_arrow [
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kind=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "= ;draw",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0location=C2=A0 =C2=A0 =3D "middle&qu= ot;,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0alternative =3D "curved",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0path=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D fullc= ircle
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0scaled=C2=A0 3cm
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0shifted (3.5cm,0cm),
=C2=A0 =C2=A0 =C2=A0] 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.<= br>
So the question is: What do you miss in metapost support? Of course it
should fit within the concept, so 'artistic freehand drawings' is n= ot
something that is likely to get interfaced. We are particularly
interested in educational applications, if only because ConTeXt started out that way.

Hans



-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 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 t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000fedb6a0590446608-- --===============8307212451253490704== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8307212451253490704==--