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 ___________________________________________________________________________________