I am trying to have a locator move along a manipulated line but every time I manipulate the variables the locator doesn't move across the new line. How can I get the locator to move across the line even after I manipulate it? Also when I try to move the manipulator it just goes to the bottom of the graph and doesn't work. I'm not really sure how tracking function is supposed to work so I know that's why that part doesn't work.
Here is my code:
Manipulate[ Plot[ 1/(4 f) (x - h)^2 + k, {x, -16, 16}, PlotRange -> {{-16, 16}, {-16, 16}}, AspectRatio -> 1/1, Epilog -> { PointSize[.02], Line[{{h, k + f}, {z, 1/(4 f) (z - h)^2 + k}, {z, k - f}}], Point[{{h, k + f}, {z, 1/(4 f) (z - h)^2 + k}, {z, k - f}}], Dashed, InfiniteLine[{h, k - f}, {1, 0}] } ], {{p, {z, 1/(4 f) (z - h)^2 + k}}, Locator, TrackingFunction -> (p = {First@#, 1/(4 f) (z - h)^2 + k@First@#}; &)}, {{z, 0}, h - 16, h + 16}, {{f, 1/4}, -8, 8}, {{h, 0}, -16, 16}, {{k, 0}, -16, 16} ] 