So I have a nice code that runs properly, which I include below but, in my naiveté, I'm having issues iterating my procedure.
Simply put, I have a function of two real variables $f(x,y)$ and I want to manually parameterize part of its zero set. It has to be manually, because the cases I'm ultimately interested in have many complicated components, of which I only want one specific one.
So I input a point $P_{0}$ which I know on the zero set. I then produce a unit tangent vector to the zero set at $P_{0}$, pick a tiny step-size $h$, multiply this unit vector by $h$ and use a minimization procedure to find a nearby point $P_{1}$ on the curve. I would like to iterate this procedure to get two vectors of the same size: $\{0,h,2h,3h,\ldots \}$ and the corresponding $(x,y)$ values on the curve corresponding to that parameter value. Here is my code so far:
f[x_, y_] = (x^2 + y^2 - 4)*((x - 1)^2 + y^2 - 4);
Dell[a_, b_] = Grad[f[a, b], {a, b}];
V[a_, b_] = (1/Norm[Dell[a, b]])*{Dell[a, b][[2]], -Dell[a, b][[1]]};
P0 = {2, 0};
h = 0.05;
Dis[x_, y_] = Norm[P0 + h*V[P0[[1]], P0[[2]]] - {x, y}];
N[Minimize[{Dis[x, y], f[x, y] == 0}, {x, y}], 10][[2]]
That last line of the code successfully outputs a nearby point on the curve $P_{1}$ which I would now like to use as input to carry out this recipe again, and get the two lists/vectors described above. Can someone perhaps help me with this step? Much appreciated.