ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Tangent vector
@ 2001-09-26 21:47 David Arnold
  2001-09-29 17:37 ` Hans Hagen
  2001-09-29 21:24 ` Patrick Gundlach
  0 siblings, 2 replies; 4+ messages in thread
From: David Arnold @ 2001-09-26 21:47 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-30 20:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-26 21:47 Tangent vector David Arnold
2001-09-29 17:37 ` Hans Hagen
2001-09-29 21:24 ` Patrick Gundlach
2001-09-30 20:00   ` Hans Hagen

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).