From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12908 invoked from network); 21 Nov 2023 18:11:38 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 21 Nov 2023 18:11:38 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id E00F6483A6C for ; Tue, 21 Nov 2023 19:09:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ESi6yECiR27p for ; Tue, 21 Nov 2023 19:09:21 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 6617D483BBC for ; Tue, 21 Nov 2023 19:07:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id A8B4F483980 for ; Tue, 21 Nov 2023 19:06:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n4ivJbF6zBJn for ; Tue, 21 Nov 2023 19:06:40 +0100 (CET) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 758F948397F for ; Tue, 21 Nov 2023 19:06:40 +0100 (CET) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-548f6f3cdc9so1793912a12.2 for ; Tue, 21 Nov 2023 10:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700590000; x=1701194800; darn=ntg.nl; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=eXCiFJ7ww0r2trn1pCuZVzfrJjQkICiAPf5CYKonYuc=; b=aMansjxftIIK2kz8hoMVHJ5KjkxpUVgF2gG+wq9MH/4RVokQbb2M6A0PF9WCQYLyqT PgEUky8s9SLi2NjLxPhw80i2hg96zHXMfr6PskTh0UG5phXo/e9zJ2hy5YuA6u3ApSdB 4ch3rSWA41mTyoVkcmgAAtjkgw85djO+CjvpyEbzPFOiZu3qmCCz4YKMZvivd5Ml5M7t p7GtOaGtm2ZFxcWO3sHElikn8O8xxUZDSxOER5v1V9SqmMZnqE6nPSWsl9fBV/VNCDen ehlxrw6BaS3LyXsziFlnj05zI+K+tIbirXvf4FAkWYVSbIEeJahp6wulMaOUz0tW6j5H 5Aew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700590000; x=1701194800; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eXCiFJ7ww0r2trn1pCuZVzfrJjQkICiAPf5CYKonYuc=; b=N1hOc7W2WkqiFieNwhqJgD6DjAiWhfCWcoKpzgjK0DgoNVqXqSK2zxdlfLEoZrpu1x 2tZlzt8isz527lb5uIzwUluX/azqVyefVxgEuwhSbgOI40rdKldCr20Pq/Nx/BOm0mQx PPtwxOedO7yHx09/VwI8wlnmmCCX2deHh+ZZcHya2xnxXqusRr7DZbSa7BUc2tEfAsY8 UA6P810MvhDtQW4XncKSH6HwOHI7dHadYFW9CWcQLnd4K8y52M6tkHbHd60U41xP5+j4 mKqKNGSu8FQOTZkwKubOhf2i3sd6V7ct5H9gpZXCugYhQCvZVSTvxIb3PRQcwImkG4LS L06w== X-Gm-Message-State: AOJu0YyIvzWBtu91BuWtqNJM/naio21SQQhyXEEBaiMIXilZ+nf8/pf4 X24ELzuTNYDOK58FiXGreKliP4f4gpbP4DZ6CAJvJkFuF74Zzw== X-Google-Smtp-Source: AGHT+IFd6BdDeZKt1msJlIPp/dje7zrpITnIRZCSZZw+laQhkOg6kRs/meNAnkBENn5O27AYRFhr9/f3xxlLxWzbljA= X-Received: by 2002:a05:6402:1202:b0:540:bf39:bf72 with SMTP id c2-20020a056402120200b00540bf39bf72mr77845edw.25.1700589999711; Tue, 21 Nov 2023 10:06:39 -0800 (PST) MIME-Version: 1.0 References: <53C67687-3050-4694-A443-D683EF98ABDB@gmail.com> <9DF71200-711B-4124-9CE6-E3CCE24421BB@gmail.com> In-Reply-To: <9DF71200-711B-4124-9CE6-E3CCE24421BB@gmail.com> From: Fabrice Couvreur Date: Tue, 21 Nov 2023 19:06:28 +0000 Message-ID: To: mailing list for ConTeXt users Message-ID-Hash: GUWYQHK2AH3GNYHEQER5XRNLCO3Z7B2J X-Message-ID-Hash: GUWYQHK2AH3GNYHEQER5XRNLCO3Z7B2J X-MailFrom: fabrice1.couvreur@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Strange behavior with anglestriped() List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============5744812720425839250==" --===============5744812720425839250== Content-Type: multipart/alternative; boundary="000000000000d769e1060aad76be" --000000000000d769e1060aad76be Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Fabrice, Exactly, thanks for the correction. Fabrice Le lun. 20 nov. 2023 =C3=A0 19:43, Fabrice L a = =C3=A9crit : > Hi, > > Fabrice, you have a problem with the definition of the path b: this path > include q and b. To see this, replace your lines with : > > draw q anglestriped (1,45,2) withcolor cyan; > draw b anglestriped (1,45,2) withcolor red; > > And you will see that the path b is drawn twice : once in red, once in > cyan. So if you change your instructions to : > > draw q anglestriped (1,45,2) withcolor cyan; > draw r anglestriped (1,45,2) withcolor cyan; > > This will correct the problem, because each path is now drawn only once. > > Fabrice. > > Le 20 nov. 2023 =C3=A0 14:47, Fabrice Couvreur a > =C3=A9crit : > > Hi Otared, > It's true that the color seems identical. > Thanks. > Fabrice > > Le dim. 19 nov. 2023 =C3=A0 21:55, Otared Kavian a =C3= =A9crit : > >> Hi Fabrice, >> >> It seems to me the colors are the same, although they may appear >> different at first sight because the =C2=AB with =C2=BB of the lines are= different >> (the width is larger in the lower rectangle). >> >> I attach the PDF created with your code. >> >> Best regards: Otared >> >> >> >> On 19 Nov 2023, at 18:56, Fabrice Couvreur >> wrote: >> >> Hi, >> I don't understand why the hatching of the two rectangles is not the sam= e >> color. >> Thanks for your help. >> Fabrice >> >> \starttext >> \setupbodyfont[8pt] >> \startMPcode >> path p, q, r, b ; >> >> z[0] =3D (2cm,0cm) ; >> z[1] =3D (2cm,2cm) ; >> z[2] =3D (0cm,2cm) ; >> >> p :=3D unitsquare xyscaled (9cm, 5cm) ; >> q :=3D llcorner p--z[0]--z[1]--z[2]--cycle ; >> r :=3D unitsquare xyscaled (7cm,3cm) shifted(2cm,2cm) ; >> b :=3D z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]-- >> z[0]--llcorner p--cycle ; >> >> >> draw b anglestriped (1,45,2) withcolor cyan; >> draw q anglestriped (1,45,2) withcolor cyan; >> >> draw p ; >> >> label.llft("A", p) ; >> label.lrt("D", p) ; >> label.ulft("B", p) ; >> label.urt("C", p) ; >> label.lft("M", z[2]) ; >> label.ulft("N", z[1]) ; >> label.bot("P", z[0]) ; >> label.top("J", ulcorner r) ; >> label.rt("I", lrcorner r) ; >> label.bot(btex $x$ etex,(llcorner p+z[0])/2); >> label.lft(btex $x$ etex,(llcorner p+z[2])/2); >> \stopMPcode >> >> \stoptext >> >> >> ________________________________________________________________________= ___________ >> If your question is of interest to others as well, please add an entry t= o >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >> (mirror) >> archive : https://github.com/contextgarden/context >> wiki : https://wiki.contextgarden.net >> >> ________________________________________________________________________= ___________ >> >> >> Otared Kavian >> e-mail: otared@gmail.com >> Phone: +33 6 88 26 70 95 >> >> >> >> >> >> ________________________________________________________________________= ___________ >> If your question is of interest to others as well, please add an entry t= o >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >> (mirror) >> archive : https://github.com/contextgarden/context >> wiki : https://wiki.contextgarden.net >> >> ________________________________________________________________________= ___________ >> > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror= ) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > _________________________________________________________________________= __________ > > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror= ) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > _________________________________________________________________________= __________ > --000000000000d769e1060aad76be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Fabrice,
Exactly, thanks for the correction.
Fabrice

Le=C2=A0lun. 20 nov. 2023 =C3=A0=C2=A019:43, Fabrice L <fabrice.alpha@gmail.com> a =C3= =A9crit=C2=A0:
<= div>Hi,

Fabrice, you have a problem with the definition = of the path b: this path include q and b. To see this, replace your lines w= ith :

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0draw q anglestriped (1,45,2) withcolor cyan;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0draw b anglestriped (1,45,2) withcolor red;

And you will see that the path b is drawn twice : once in= red, once in cyan. So if you change your instructions to :

<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0draw q anglestriped= (1,45,2) withcolor cyan;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0draw r anglestriped (1,45,2) withcolor cyan;

<= div>This will correct the problem, because each path is now drawn only once= .=C2=A0

Fabrice.=C2=A0

Le 20 nov. 2023 =C3=A0 14:47, Fabrice Couvreur <fabrice1.couvreu= r@gmail.com> a =C3=A9crit :

Hi Otared,
= It's true that the color seems identical.
Thanks.
Fabrice
<= /div>
L= e=C2=A0dim. 19 nov. 2023 =C3=A0=C2=A021:55, Otared Kavian <otared@gmail.com> a =C3=A9c= rit=C2=A0:
= Hi Fabrice,

It seems to me the colors are the same, alth= ough they may appear different at first sight because the =C2=AB with =C2= =BB of the lines are different (the width is larger in the lower rectangle)= .

I attach the PDF created with your code.

Best regards: Otared



On 19 Nov 2023, at 1= 8:56, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote:

<= div dir=3D"ltr">
Hi,
I don't understand why the hatching of the two rectan= gles is not the same color.=C2=A0
Thanks for your help.
Fabrice
<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">
\= starttext
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \setupbodyfont[8pt]
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 \startMPcode
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= path p, q, r, b ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0z[0] =3D (2cm,0cm) ;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0z[1] =3D (2cm,2cm) ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0z[2] =3D (0cm,2cm) ;

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0p :=3D unitsquare xyscaled (9cm, 5cm) ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0q :=3D llcorner p--z[0]--z[1]--z[2]--cycle ;
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0r :=3D unitsquare xyscaled (7cm,3cm) shifted(2cm= ,2cm) ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0b :=3D z[2]--z[1]--ulco= rner r--urcorner p--lrcorner r--z[1]--
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0z[0]--llcorner p--cycle ;
=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=A0draw b anglestriped (1,45,2) withcolor cyan;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0draw q anglestriped (1,45,2) withcolor cyan;=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0draw p ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.llft("A", p) ;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.lrt("D", p) ;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.ulft("B", p) ;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.urt("C", p) ;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.lft("M", z[2]) ;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.ulft("N", z[1]) = ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.bot("P", z[0]= ) ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.top("J", ul= corner r) ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.rt("I&qu= ot;, lrcorner r) ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0label.bot(bt= ex $x$ etex,(llcorner p+z[0])/2);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0label.lft(btex $x$ etex,(llcorner p+z[2])/2);
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 \stopMPcode

\stoptext

___________________________________________________________________________= ________
If your question is of interest to others as well, please add a= n entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.nt= g.nl/mailman3/lists/ntg-context.ntg.nl
webpage =C2=A0: https://www.pragma-ade.nl /= https://context.= aanhet.net (mirror)
archive =C2=A0: https://github.com/contextgarden/con= text
wiki =C2=A0=C2=A0=C2=A0=C2=A0: https://wiki.contextgarden.net
_______= ___________________________________________________________________________= _

Otared Kavian
Phone: +33 6 88 26= 70 95




___________________________________________________________= ________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / https://mailman.ntg.nl/mail= man3/lists/ntg-context.ntg.nl
webpage=C2=A0 : https://www.pragma-ade.nl / https://context.aanhet.n= et (mirror)
archive=C2=A0 : https://github.com/contextgarden/context=
wiki=C2=A0 =C2=A0 =C2=A0: https://wiki.contextgarden.net
___________________________________________________________________________= ________
___________________________________________________________________________= ________
If your question is of interest to others as well, please add a= n entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.nt= g.nl/mailman3/lists/ntg-context.ntg.nl
webpage =C2=A0: https://www.pragma-ade.nl / = https://context.aa= nhet.net (mirror)
archive =C2=A0: https://github.com/contextgarden/conte= xt
wiki =C2=A0=C2=A0=C2=A0=C2=A0: https://wiki.contextgarden.net
__________= _________________________________________________________________________

________________________________= ___________________________________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / https://mailman.ntg.nl/mail= man3/lists/ntg-context.ntg.nl
webpage=C2=A0 : https://www.pragma-ade.nl / https://context.aanhet.net= (mirror)
archive=C2=A0 : https://github.com/contextgarden/context=
wiki=C2=A0 =C2=A0 =C2=A0: https://wiki.contextgarden.net
___________________________________________________________________________= ________
--000000000000d769e1060aad76be-- --===============5744812720425839250== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============5744812720425839250==--