From: Gavin via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Gavin <gavinpublic@icloud.com>
Subject: [NTG-context] MetaFun path joiners && and &&&& do not like single point paths
Date: Sat, 30 Dec 2023 19:31:07 -0700 [thread overview]
Message-ID: <30D4ED0D-B439-48A9-BF23-E9F5A0513E5C@icloud.com> (raw)
Hi MetaFun fans,
Following a suggestion of Hans, I experimented with && and &&& and &&&& for joining paths in MetaFun. The joiner &&& produces one long path, but && and &&&& seem to produce a disconnected path which includes all the original paths. However, if one of the paths is a single point, then it connects it. MWE below.
I spotted this on my globes module, where we saw an extra line appear for a very specific orientation of the globe. I guessed that this orientation had an island right on the horizon, so that only one boundary point was visible, creating a singe point path for that island. I should probably fix my module so it doesn’t do that. However, it might be nice to have && and &&&& deal with this situation gracefully.
Gavin
\startMPpage
path p[], q ;
p1 = fullcircle scaled 3cm ;
p2 = fullcircle scaled 2cm shifted (3cm,0) ;
p3 = (3cm,2cm) ;
q = for i = 1 upto 3 :
p[i] &&
endfor
cycle ;
draw p1 withpen pencircle scaled 2pt withcolor .7 ;
draw p2 withpen pencircle scaled 2pt withcolor .7 ;
draw p3 withpen pencircle scaled 2pt withcolor .7 ;
draw q withcolor red ;
eofill q withcolor 0.9 ;
draw fullcircle scaled 6cm shifted (1.25cm,0) ;
\stopMPpage
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2023-12-31 2:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-31 2:31 Gavin via ntg-context [this message]
2023-12-31 7:06 ` [NTG-context] " Mikael Sundqvist
2023-12-31 11:14 ` Hans Hagen via ntg-context
2023-12-31 14:10 ` Gavin via ntg-context
2024-01-09 1:19 ` [NTG-context] Lua and inject.path to make a disconnected MetaPost path? Gavin via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30D4ED0D-B439-48A9-BF23-E9F5A0513E5C@icloud.com \
--to=ntg-context@ntg.nl \
--cc=gavinpublic@icloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).