From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107537 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Keith McKay Newsgroups: gmane.comp.tex.context Subject: Re: 'debug' version of METAPOST draw? Date: Thu, 28 May 2020 20:24:52 +0100 Organization: The PotHole Press Message-ID: References: <7BCD7589-E126-49E9-91B9-11C8D582E040@rna.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7695499462413126509==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="6506"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu May 28 21:25:11 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jeO9O-0001ce-TK for gctc-ntg-context-518@m.gmane-mx.org; Thu, 28 May 2020 21:25:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C1CE71846B6; Thu, 28 May 2020 21:24:57 +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 wncCXALlpRm9; Thu, 28 May 2020 21:24:56 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CEB391846EC; Thu, 28 May 2020 21:24:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8CF651846E9 for ; Thu, 28 May 2020 21:24:55 +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 hBSHeH6TQ2qe for ; Thu, 28 May 2020 21:24:54 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.49; helo=mail-wm1-f49.google.com; envelope-from=mckaymeister@gmail.com; receiver= Original-Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 B0F021846B6 for ; Thu, 28 May 2020 21:24:54 +0200 (CEST) Original-Received: by mail-wm1-f49.google.com with SMTP id k26so227738wmi.4 for ; Thu, 28 May 2020 12:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=IOcyA1Q6oNR8LZOcthK4qHXPW/H1AEmQLlNmLDnlf08=; b=ToxPx6pVuVTNtlgmiDQ46FQCU/HH9apad1/fVsmu9vT7ROAbayjCrfUIzrG6oTQWpN 6+Oo4teXCQVj2g9vHwLTzBSEEbrOXq28lEapiCAsy0gZbbLO0PBgXy6ZYYxnAQ4meLZP gj8GB4Q/rr/rSZiyMKQfpj3zgPSpEVnqUzt38DMn6l++XDkyQRfByF3kUifHPVjvIJRx HCRiQOsR+GlQr+9VxCclriHX4Pjqf8Zmo65yLFT6UnFfruazHlMdEoXnrgyBxWVMVBzl vmEoaR3jC0IT47vN8POgK/gCB0q53o7Bqsuxl/yLSa29NDr6JRf6rnHABxNOhyAMgMFy Jc3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language; bh=IOcyA1Q6oNR8LZOcthK4qHXPW/H1AEmQLlNmLDnlf08=; b=iO6lRtFIwdLrfZ2scIzhC5dYHdqTwY8Nnu2vZrcvzMuBh6v4qtPVL2iVcGThdpEy3C rAS9Q3Jqhnu1hLU89ODQTrjRkirAdzZ6i9sXLwyyefTR2XPco09ojHIprMdyM2NGqPhI 5gzWMWrpXS7UDh4zMCfMTEDhF54sGENGvXYu/HZewZkCY3PIWwMxRxuiixC4+hTYvL7c rumdilZpHmsjBXwVMQ97/WJTVAofuMR6HV5iOBlNmk31lIaq30La1vC8gV+iXGgUhzws HsNxgsnSulk3hngwq5395IETf3c01xbjG104OUcPjrxqshcKY3tE6RWsLndKFUruGxQo aMiQ== X-Gm-Message-State: AOAM531PRjV5TUYxAoYX3HyZ4M9XsKGMT0h8JmeReNldMk35rFAZi+Zr HaGShbccT73JbPHO0qwCNuV2PaGW X-Google-Smtp-Source: ABdhPJw2/UAq3BtauCYd9SpFFC+xPTj4nyjSkzxsvyPGHpH6M4+lewXZzcWBnT3ivYt3llGONg3HHQ== X-Received: by 2002:a7b:cb91:: with SMTP id m17mr5029206wmi.126.1590693893959; Thu, 28 May 2020 12:24:53 -0700 (PDT) Original-Received: from Keiths-Mac-mini.local (cpc100294-uddi29-2-0-cust139.20-3.cable.virginm.net. [82.42.59.140]) by smtp.googlemail.com with ESMTPSA id h188sm3038626wmh.2.2020.05.28.12.24.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 May 2020 12:24:53 -0700 (PDT) In-Reply-To: <7BCD7589-E126-49E9-91B9-11C8D582E040@rna.nl> Content-Language: en-US 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.io gmane.comp.tex.context:107537 Archived-At: This is a multi-part message in MIME format. --===============7695499462413126509== Content-Type: multipart/alternative; boundary="------------97AE7F22C6E4DE1C1D322FA7" Content-Language: en-US This is a multi-part message in MIME format. --------------97AE7F22C6E4DE1C1D322FA7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Would Chapter 11, section 11.1 Showing Paths of the MetaPost manual, be any help here? Below is a MWE of a random path of curves and straight lines. The points are shown using drawpoints. The arrow path and control lines are also shown and are better described in the Metapost manual. %%%%%%%%%%%%MWE%%%%%%%%%%% \setuppapersize [A4,landscape] \starttext \startMPpage[instance=doublefun] StartPage; width := PaperWidth ; height := PaperHeight ; unit := cm ; path p ; path pat; pat := (5cm,5cm); for a = 1 step 1 until 10: x:= uniformdeviate(10) +10; y:= uniformdeviate(10) +10; if odd a: pat := pat .. (x*cm,y*cm); else: pat := pat -- (x*cm,y*cm); fi; draw pat withpen pencircle scaled 5mm withcolor .5green; endfor; drawarrowpath pat; drawpoints pat; drawcontrollines pat withcolor .625red ; StopPage; \stopMPpage \stoptext %%%%%%%%%%%%%%% end MWE %%%%%%%%%%%%%%%%% A better coder than me may be able to incorporate it into what you require. Best Wishes Keith McKay On 28/05/2020 12:33, Gerben Wierda wrote: > I would like to be able (during development) to draw paths where the points of the path (and maybe thing slike directions) are visualised. E.g. a path where each pair in teh path is also drawn as a dot and maybe teh directions drawn as small arrows. > > Does someone have such a beast lying around? > > G > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ --------------97AE7F22C6E4DE1C1D322FA7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Would Chapter 11, section 11.1 Showing Paths of the MetaPost manual, be any help here?

Below is a MWE of a random path of curves and straight lines. The points are shown using drawpoints. The arrow path and control lines are also shown and are better described in the Metapost manual.

%%%%%%%%%%%%MWE%%%%%%%%%%%

\setuppapersize [A4,landscape]

\starttext

\startMPpage[instance=doublefun]

StartPage;

width := PaperWidth ; height := PaperHeight ; unit := cm ;

path p ;

path pat;

pat := (5cm,5cm);

for a = 1 step 1 until 10:

x:= uniformdeviate(10) +10;

y:= uniformdeviate(10) +10;

if odd a:

pat := pat .. (x*cm,y*cm);

else:

pat := pat -- (x*cm,y*cm);

fi;

draw pat withpen pencircle scaled 5mm withcolor .5green;

endfor;

drawarrowpath pat;

drawpoints pat;

drawcontrollines pat withcolor .625red ;

StopPage;

\stopMPpage

\stoptext

%%%%%%%%%%%%%%% end MWE %%%%%%%%%%%%%%%%%

A better coder than me may be able to incorporate it into what you require.

Best Wishes

Keith McKay

On 28/05/2020 12:33, Gerben Wierda wrote:
I would like to be able (during development) to draw paths where the points of the path (and maybe thing slike directions) are visualised. E.g. a path where each pair in teh path is also drawn as a dot and maybe teh directions drawn as small arrows.

Does someone have such a beast lying around?

G
___________________________________________________________________________________
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
___________________________________________________________________________________
--------------97AE7F22C6E4DE1C1D322FA7-- --===============7695499462413126509== 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== --===============7695499462413126509==--