ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz via ntg-context" <ntg-context@ntg.nl>
To: Hans Hagen <j.hagen@xs4all.nl>, ntg-context@ntg.nl
Cc: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
Subject: Re: metafun: circular arc
Date: Tue, 5 Oct 2021 23:32:02 +0200	[thread overview]
Message-ID: <0f3be5cc-7fbe-2394-8e5b-a0d847592469@uni-bonn.de> (raw)
In-Reply-To: <78bee709-62c5-efc9-01b1-05a4543b8b0b@xs4all.nl>


Thank you so much, Hans, that's a neat solution! I was banging my head 
against the wall, but this makes sense.

On 10/5/21 6:38 PM, Hans Hagen wrote:
> Because you know how to rotate and scale:
> 
> \startuseMPgraphic{empedocless}
> path p, q, r ;
> pair a ;
> 
> p := fullcircle scaled 10cm ;
> drawarrow p              withpen pencircle scaled 1mm withcolor red ;
> draw        point 0 of p withpen pencircle scaled 1mm withcolor blue ;
> q := p cutafter (point .4 along p) ;
> drawarrow q              withpen pencircle scaled .5mm withcolor green ;
> draw followtext(q, "\strut TEXT ONE") ;
> 
> p := fullcircle scaled 8cm ;
> drawarrow p              withpen pencircle scaled 1mm withcolor cyan ;
> draw        point 0 of p withpen pencircle scaled 1mm withcolor magenta ;
> q := p cutafter (point .3 along p) ;
> q := q rotated 120 ;
> drawarrow q              withpen pencircle scaled .5mm withcolor yellow ;
> draw followtext(q, "\strut TEXT TWO") ;
> 
> % the real deal: best make a macro for this
> 
> p := fullcircle scaled 6cm ;
> draw        point 0 of p withpen pencircle scaled 5mm withcolor blue ;
> drawarrow p              withpen pencircle scaled 1mm withcolor red ;
> a := (point eps of p) rotated 45 ;
> draw a withpen pencircle scaled 2mm;
> q := p cutafter a ;
> q := q rotated 20 ;
> drawarrow q              withpen pencircle scaled .5mm withcolor green ;
> draw followtext(q, "\strut TEXT TWO") ;
> 
> \stopuseMPgraphic
> 
> \useMPgraphic{empedocless}
> 
> So, just always start at point 0 and then just rotate the cutof piece 
> over the angle that you want. The eps in the last case makes that we 
> actually have a cut off piece (zero fails here).
> 
> So ... solution 4. best suits non math gurus (like you and me).

This is the part of your reply that fails to convince. You don't even 
know how bad I am at math...

Thanks, and all best

Thomas
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2021-10-05 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 14:58 Thomas A. Schmitz via ntg-context
2021-10-05 16:38 ` Hans Hagen via ntg-context
2021-10-05 21:32   ` Thomas A. Schmitz via ntg-context [this message]
2021-10-06  5:36     ` Floris van Manen 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=0f3be5cc-7fbe-2394-8e5b-a0d847592469@uni-bonn.de \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.nl \
    --cc=thomas.schmitz@uni-bonn.de \
    /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).