#!/bin/sh

set -e

# initial run forward, a LP is detected
rauto cusp muf

# initial run backward, a LP is detected
rauto cusp mub -DS -

# compute locus of folds
rrun=muf
rauto cusp LPf $rrun -IRS $(splabs $rrun LP 1 1) -ISW 2
rauto cusp LPb $rrun -IRS $(splabs $rrun LP 1 1) -ISW 2 -DS -

# show graphics
echo ""
echo "plot branch of equilibrium points with:"
echo 'plotbd 1:3 "[-2:2]" "[-2:2]" muf mub'

echo ""
echo "plot locus of limit points with:"
echo 'plotbd 1:4 "[-2:2]" "[-2:2]" LPf LPb'

echo ""
echo "plot all together with:"
echo 'plotbd -i 1:4:3 "[-2:2]" "[-2:2]" muf mub LPf LPb'
