Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Plot a predator-prey pursuit curve
ResourceFunction["PursuitCurvePlot"][c,p,{t,t0,tf}] plots the pursuit curve of a predator starting at a point p, moving in the direction of the current position of the prey, following a path c from time t0 to time tf. |
| "DirectionOfMotion" | plot vectors in the directions of motion of the predator and the prey |
| "PredatorPreyVectorSet" | plot a set of vectors from the predator to the prey as the curve evolves |
Plot the pursuit curve for linear motion with unit speed:
| In[1]:= |
| Out[1]= | ![]() |
Animate the pursuit curve over time:
| In[2]:= | ![]() |
| Out[2]= | ![]() |
Plot the pursuit curve for circular motion:
| In[3]:= |
| Out[3]= | ![]() |
Manipulate the curve evolution via the time parameter:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
A case where the predator never reaches the prey:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
Use a figure-eight prey curve:
| In[6]:= | ![]() |
| Out[6]= | ![]() |
Use a gradient of colors for the curve:
| In[7]:= |
| Out[7]= | ![]() |
Remove the vectors:
| In[8]:= |
| Out[8]= | ![]() |
Use a custom function to put points for current positions:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
Include a plot of the distance between predator and prey:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
Plot a set of vectors between the predator and the prey along the evolution of the curves:
| In[11]:= | ![]() |
| Out[11]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License