Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-27 Thread James Fisher
Ah, lovely! Who knew there would be so many different solutions? I'm going to use Nicola's solution on this occasion, as it fits my thought process best -- but thanks to Troy as your solutions showed me some other things I didn't know. All the best, James On Fri, Feb 26, 2010 at 9:42 PM,

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-26 Thread Nicola
In article 771da05a1002251718l55669a0co770b5a78bed84...@mail.gmail.com, James Fisher jameshfis...@gmail.com wrote: This isn't specifically a ConTeXt question, but via it I've run into a seemingly simple problem in METAPOST that I just can't solve. I'm trying to draw a parallelogram by

[NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread James Fisher
This isn't specifically a ConTeXt question, but via it I've run into a seemingly simple problem in METAPOST that I just can't solve. I'm trying to draw a parallelogram by specifying: (1) the length of sides parallel to the x-axis; (2) the total height of the figure; (3) one of the interior

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread Troy Henderson
James, Try this: z0 = origin; z1 = (5,0); z3 = 10*dir(87); z2 = z3-z0+z1; Troy Henderson ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread Troy Henderson
James, I apologize, but the previous information that I gave you was wrong. Try this instead: z0 = origin; z1 = (5,0); BL:=87; r:=10/sind(BL); z3 = r*dir(BL); z2 = z3-z0+z1; Troy ___ If your question is of interest

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread James Fisher
Aha! That certainly works. I suspected I would have to fall back on low-level trig :). Many thanks! On Fri, Feb 26, 2010 at 1:44 AM, Troy Henderson thend...@gmail.com wrote: James, I apologize, but the previous information that I gave you was wrong. Try this instead: z0 = origin; z1 =

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread Troy Henderson
James, How about this. BL:=87; z0=origin; z1=(5,0); z4=dir(BL); % Intermediate point z3=10/y4*z4; z2=z3+z1; or alternatively without having to define z4 BL:=87; z0=origin; z1=(5,0); z3=10/(ypart dir(BL))*dir(BL); z2=z3+z1;