From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/5749 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Tangent vector Date: Sat, 29 Sep 2001 19:37:10 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20010929192848.025badc0@pop.planet.nl> References: <3.0.5.32.20010926144726.008f2360@mail.northcoast.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035396321 4290 80.91.224.250 (23 Oct 2002 18:05:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:05:21 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: David Arnold In-Reply-To: <3.0.5.32.20010926144726.008f2360@mail.northcoast.com> Xref: main.gmane.org gmane.comp.tex.context:5749 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:5749 At 02:47 PM 9/26/2001 -0700, David Arnold wrote: >In the second image in this file, I am disappointed to find that the vector >doesn't look tangent to the path at the tip of the position vector. now, are your disappointed in me, metapost, or yourself -) how about: d:=direction 1 of p; since you *know* that 1,2 (not 1u,2u !) is point 1 there is no need for time calculations also, keep in mind that this times/point stuff is sensitive to rounding errors (in that respect you can indeed be disappointed in mp) now, your error result from calculating a time for a scaled point (watch the 1u,2u) while you have no scaled path but scale it afterwards. i think that your code snippet will become more clean if you say p := p scaled u after setting p and then work on the scaled path, or alternatively use no u's and only scale the whole to u, but this is a matter of taste. i've fallen in this trap some times too [at first i thought that your sample was a rounding error; suggestion: in such case draw d withpen pencircle scaled 5 helps; add this to your code and you will see that you got the point + 1,2 near point zero which indeed has the tangent you got. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------