Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
An Arrow whose heads move dynamically
ResourceFunction["AnimatedArrow"][pts] is a Graphics or Graphics3D primitive that displays as an Arrow but with animated Arrowheads. |
| "HeadSize" | 0.04 | size of the arrowheads |
| "HeadCount" | 1 | number of arrowheads to display |
| "Period" | 2 | time (in seconds) taken for an arrowhead to travel the length of the arrow |
| "InitialPosition" | 0 | position of the arrowhead at time 0 |
| "Time" | Automatic | current time in the animation |
AnimatedArrow displays the same as Arrow except its head position is animated:
| In[1]:= |
| Out[1]= | ![]() |
AnimatedArrow can be used in Graphics3D:
| In[2]:= |
| Out[2]= | ![]() |
AnimatedArrow can be specified with a BSplineCurve:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
Control the size of the arrowheads with "HeadSize":
| In[4]:= |
| Out[4]= | ![]() |
Control the number of arrowheads with "HeadCount":
| In[5]:= |
| Out[5]= | ![]() |
Control the speed of the arrowhead movement with "Period". The period is measured in the number of seconds it takes an arrowhead to travel the length of the arrow:
| In[6]:= |
| Out[6]= | ![]() |
Multiple arrows will be synchronized:
| In[7]:= | ![]() |
| Out[7]= | ![]() |
Use "InitialPostion" to control their relative positions:
| In[8]:= | ![]() |
| Out[8]= | ![]() |
Use "InitialPostion" with RuleDelayed to randomly desynchronize arrows:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
While AnimatedArrow is intended to be automatically animated, you may wish to control the animation by specifying the time, for example, if you wish to export the result to a movie:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License