MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why is the Arrow routine so poor?

  • To: mathgroup at
  • Subject: [mg55475] Re: [mg55465] Why is the Arrow routine so poor?
  • From: Chris Chiasson <chris.chiasson at>
  • Date: Fri, 25 Mar 2005 05:48:16 -0500 (EST)
  • References: <>
  • Reply-to: Chris Chiasson <chris.chiasson at>
  • Sender: owner-wri-mathgroup at

the arrow flies off the right side of the animation

Mathematica 5.0 on Windows:
press delete key once to stop animation in help browser
press delete key a second time to remove animation cells

On Thu, 24 Mar 2005 03:42:09 -0500 (EST), David Park <djmp at> wrote:
> Here is some code that draws small arrows anchored at {1,0}.
> Needs["Graphics`Arrow`"]
> SetOptions[Arrow, HeadScaling -> Relative, HeadCenter -> 1/2, HeadWidth -> 1,
>    HeadLength -> 0.2];
> frame[n_] := Show[Graphics[{Arrow[{1., 0}, {1. + 10^(-n), 0}],
>       Text["n = "n, Scaled[{0.1, 0.9}], {-1, 0}]}], Frame -> True,
>     FrameTicks -> None, PlotRange -> {{1. - 10^(-n), 1. + 2/10^n},
>       {-2/10^n, 2/10^n}}];
> Table[frame[n], {n, 4, 6, 0.1}];
> SelectionMove[EvaluationNotebook[], All, GeneratedCell]
> FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.5];
> FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1,
>     AnimationDirection -> Forward]}]
> You will see that the arrowhead becomes detached from its normal position at the end of the line and moves all over the line, eventually being lost from view.
> Obviously, if we make the arrow too short we are going to run into precision problems - but these arrows don't seem to be that short as we still have 10 places of machine precision left.
> It seems to me that the fundamental design of Arrow is flawed in that it specifies the starting and ending point of the arrow. Wouldn't it have been better to specify the starting location and then the vector itself, anchored at zero? I don't know how the internals of the routine work, but it seems things would have worked better if the vector were first drawn and then shifted to the starting point.
> (Incidentally, you can also try the following experiment. Open the Help browser to any Help page and open the example section. Then paste the above code at the bottom of the Help page. Then evaluate and try to stop the animation. I'd be interested if I am the only one who has a problem with this.)
> David Park
> djmp at

Chris Chiasson
Kettering University
Mechanical Engineering
Graduate Student
1 810 265 3161

  • Prev by Date: Re: Re: using Mathematica to plot in visual studio
  • Next by Date: Re: Re: Newbie Question About An Error Message
  • Previous by thread: Why is the Arrow routine so poor?
  • Next by thread: Re: How to change the ResultFormatType of the MathKernel in a ASP.NET Web Application?