From: Henri Menke <henrimenke@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: MetaFun: Rotate picture without rotating labels
Date: Fri, 06 Apr 2018 11:13:37 +1200 [thread overview]
Message-ID: <1522970017.18581.17.camel@gmail.com> (raw)
In-Reply-To: <1522969538.18581.13.camel@gmail.com>
On Fri, 2018-04-06 at 11:05 +1200, Henri Menke wrote:
> Dear list,
>
> In the MWE below I would like py to be px rotated by 90 degrees but the labels
> should not be rotated. Is it possible?
>
> Cheers, Henri
>
> ---
I thought of using vardef but that is kind of verbose because I gave to repeat
"rotated angle" three times.
\startMPpage
vardef orbital(expr angle) =
save p ;
path p ;
p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (-2,-1) .. cycle ;
image (
draw p scaled 6 rotated angle;
label("\strut$+$",(+10,0) rotated angle);
label("\strut$-$",(-10,0) rotated angle);
)
enddef ;
picture px, py ;
px := orbital ( 0) ;
py := orbital (90) ;
draw px ;
draw py ;
\stopMPpage
>
> \startMPpage
>
> path p ; p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (-
> 2,-1) .. cycle ;
> picture px, py ;
> px := image (
> draw p scaled 6 ;
> label("$+$",(+10,0));
> label("$-$",(-10,0));
> ) ;
> py := px rotated 90 ;
>
> draw px ;
> draw py ; % meh :/
>
> \stopMPpage
>
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2018-04-05 23:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 23:05 Henri Menke
2018-04-05 23:13 ` Henri Menke [this message]
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=1522970017.18581.17.camel@gmail.com \
--to=henrimenke@gmail.com \
--cc=ntg-context@ntg.nl \
/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).