# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Plot a predator-prey pursuit curve

Contributed by:
Wolfram Staff (original content by Michael Trott)

ResourceFunction["PursuitCurvePlot"][ }]t_{f}plots the pursuit curve of a predator starting at a point |

ResourceFunction["PursuitCurvePlot"] has the same options as ParametricPlot and NDSolve, with the addition of "PursuitCurveDataFunction".

Possible settings for "PursuitCurveDataFunction" are:

"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 |

The prey moves along a prescribed curve and the predator describes a pursuit curve, moving always in the direction of the prey with constant speed. If a third argument is not given, the predator and prey are taken to move at the same speed.

Let *α*=(*x*,*y*) and *β*=(*f*,*g*), and assume *α* is the pursuit curve of *β*. Then the statement that the predator and prey move at constant speed implies that *x*'^{2}+*y*'^{2}=*k*^{2}(*f*'^{2}+*g*'^{2}). The statement that the predator always moves toward the current position of the prey is equivalent to *x*'(*y*-*g*)-*y*'(*x*-*f*)=0.

Integration stops when the distance between predator and prey is less than 10^{-3}.

Pursuit curves were considered in general by Pierre Bouguer in 1732, and by George Boole.

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]= |

- 1.0.0 – 19 July 2021

This work is licensed under a Creative Commons Attribution 4.0 International License