Re: [NTG-context] Thanks. Two new questions: rotate and scale
only to (1): try draw (((0,0) -- dir(0)*u -- dir(60)*u --cycle) rotated 60); greetings, Albrecht On Thu, 12 Mar 2009, Curious Learn wrote: Aditya and Hans, Thanks very much for your replies. I suppose I should install minimals afterall. Still using the TexLive version. I have two new questions: (1) In the following code the triangle outline (obtained with the draw command) does not rotate, i.e., I get the same triangle as without the rotated command. On the other hand the fill command rotates as expected. What is wrong? \startuseMPgraphic{Dir} pickup pencircle scaled 2pt; numeric u; u=2cm; draw (0,0) -- dir(0)*u -- dir(60)*u --cycle rotated 60; fill (0,0) -- dir(0)*u -- dir(60)*u --cycle rotated 60 withcolor (0.58,0.94,0.9); \stopuseMPgraphic \useMPgraphic{Dir} (2) Is there a command to scale the whole picture...not the components? Thanks very much. I have said this before but want to say this again. Thanks so much to the developers of Context who have given us this wonderful system. Thanks also to all the people on this mailing list who take their precious time to answer questions. ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Thanks. Two new questions: rotate and scale
(2) Is there a command to scale the whole picture...not the components? Parse error. In my view, the whole picture *is* the components. Best wishes, Taco ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Thanks. Two new questions: rotate and scale
Albrecht Kauffmann alkauffm at rz.uni-potsdam.de writes: only to (1): try draw (((0,0) -- dir(0)*u -- dir(60)*u --cycle) rotated 60); Thanks Albrecht. That worked great. ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Thanks. Two new questions: rotate and scale
Taco Hoekwater taco at elvenkind.com writes: (2) Is there a command to scale the whole picture...not the components? Parse error. In my view, the whole picture *is* the components. Best wishes, Taco Hi Taco, Sorry for the typo and for not being clear. I meant the following. I know that scaled command can be used to scale any particular component. To scale the whole picture does one have to scale each and every component individually, or is there one command that scales every component. One way is perhaps to define a variable, say u=1cm and express all measurements in terms of u. Then by changing just u one can scale the whole picture (and all the components) up or down. Is there another way? For example, in TikZ there is a command scale which scales the entire picture if put as an option to \begin{tikzpicture}. I was wondering if something like that is available in Metapost too. ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Thanks. Two new questions: rotate and scale
On Fri, Mar 13, 2009 at 2:39 PM, Curious Learn curiousle...@gmail.com wrote: Taco Hoekwater taco at elvenkind.com writes: (2) Is there a command to scale the whole picture...not the components? Parse error. In my view, the whole picture *is* the components. Best wishes, Taco Hi Taco, Sorry for the typo and for not being clear. I meant the following. I know that scaled command can be used to scale any particular component. To scale the whole picture does one have to scale each and every component individually, or is there one command that scales every component. One way is perhaps to define a variable, say u=1cm and express all measurements in terms of u. Then by changing just u one can scale the whole picture (and all the components) up or down. Is there another way? For example, in TikZ there is a command scale which scales the entire picture if put as an option to \begin{tikzpicture}. I was wondering if something like that is available in Metapost too. Hi, I use the method of u=1mm; in the beginning and then use u as the unit. I think currentpicture is what you are after otherwise, but not sure. Mikael ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Thanks. Two new questions: rotate and scale
Curious Learn wrote: Taco Hoekwater taco at elvenkind.com writes: (2) Is there a command to scale the whole picture...not the components? Parse error. In my view, the whole picture *is* the components. Best wishes, Taco Hi Taco, Sorry for the typo and for not being clear. I meant the following. I know that scaled command can be used to scale any particular component. To scale the whole picture does one have to scale each and every component individually, or is there one command that scales every component. You want this, I think: beginfig(1); ... do stuff ... currentpicture := currentpicture scaled X; endfig; ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Thanks. Two new questions: rotate and scale
Taco Hoekwater taco at elvenkind.com writes: You want this, I think: beginfig(1); ... do stuff ... currentpicture := currentpicture scaled X; endfig; Awesome!! This is exactly what I was looking for. Thanks Taco and Mikael. ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Thanks. Two new questions: rotate and scale
Aditya and Hans, Thanks very much for your replies. I suppose I should install minimals afterall. Still using the TexLive version. I have two new questions: (1) In the following code the triangle outline (obtained with the draw command) does not rotate, i.e., I get the same triangle as without the rotated command. On the other hand the fill command rotates as expected. What is wrong? \startuseMPgraphic{Dir} pickup pencircle scaled 2pt; numeric u; u=2cm; draw (0,0) -- dir(0)*u -- dir(60)*u --cycle rotated 60; fill (0,0) -- dir(0)*u -- dir(60)*u --cycle rotated 60 withcolor (0.58,0.94,0.9); \stopuseMPgraphic \useMPgraphic{Dir} (2) Is there a command to scale the whole picture...not the components? Thanks very much. I have said this before but want to say this again. Thanks so much to the developers of Context who have given us this wonderful system. Thanks also to all the people on this mailing list who take their precious time to answer questions. ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___