ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: David Arnold <darnold@northcoast.com>
Subject: Tangent vector
Date: Wed, 26 Sep 2001 14:47:26 -0700	[thread overview]
Message-ID: <3.0.5.32.20010926144726.008f2360@mail.northcoast.com> (raw)

All,

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.

input mp-tool;

beginfig(1);

%initialize scale
 numeric u; 6u=3in;

%draw coordinate axes
 drawdblarrow (-1u,0)--(5u,0);
 label.rt(btex $x$ etex, (5u,0));
 drawdblarrow (0,-1u)--(0,3u);
 label.top(btex $y$ etex, (0,3u));

%path
 path p;
 p:=(-1,1)..(1,2)..(5,2.5);
 p:=p scaled u;
 draw p withcolor blue;

%position vector
 drawarrow (0,0)--(1u,2u) withcolor red;
 label.lrt(btex ${\bf r}(t)$ etex, 0.5[(0,0),(1u,2u)]);
 dotlabel.ulft(btex $(x(t),y(t))$ etex, (1u,2u));
endfig;

beginfig(2);

%initialize scale
 numeric u; 6u=3in;

%draw coordinate axes
 drawdblarrow (-1u,0)--(5u,0);
 label.rt(btex $x$ etex, (5u,0));
 drawdblarrow (0,-1u)--(0,3u);
 label.top(btex $y$ etex, (0,3u));

%path
 path p;
 p:=(-1,1)...(1,2)...(5,2.5);

%position vector
 drawarrow (0,0)--(1u,2u) withcolor red;
 label.lrt(btex ${\bf r}(t)$ etex, 0.5[(0,0),(1u,2u)]);
 dotlabel.ulft(btex $(x(t),y(t))$ etex, (1u,2u));

%calculate the velocity vector
 numeric t;
 t:=directiontime (1u,2u) of p;
 pair d;
 d:=direction t of p;
 drawarrow ((0,0)--d) scaled u shifted (1u,2u);

 p:=p scaled u;
 draw p withcolor blue;

endfig;

end.


             reply	other threads:[~2001-09-26 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-26 21:47 David Arnold [this message]
2001-09-29 17:37 ` Hans Hagen
2001-09-29 21:24 ` Patrick Gundlach
2001-09-30 20:00   ` Hans Hagen

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=3.0.5.32.20010926144726.008f2360@mail.northcoast.com \
    --to=darnold@northcoast.com \
    /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).