Some context:
For an implicit function f(x,y) = 0, at the point (a,b):
- The curve normal is (df[x=a,y=b]/dx, df[x=a,y=b]/dy)
- The equation of the curve tangent is (df[x=a,y=b]/dx)*(x-a) + (df[x=a,y=b]/dy)*(y-b) = 0
Solving the equation for delta_x = x-a and setting y = b+delta_y gives delta_x = -(df[x=a,y=b]/dy) / (df[x=a,y=b]/dx) * delta_y, which is the contribution that a small change in y has on the movement in x along the tangent. Adding delta_x to the result gives the contribution that a small change in x _plus_ a small change in y has on the movement in x along the tangent. Solving the equation also for the movement in y gives a "movement contribution vector" at the point (a,b):
(delta_x - (df[x=a,y=b]/dy) / (df[x=a,y=b]/dx) * delta_y, delta_y - (df[x=a,y=b]/dx) / (df[x=a,y=b]/dy) * delta_x)
As delta_x -> dx and delta_y -> dy, we have a relation for the difference in arc length -> ds^2 = dx^2 + dy^2, making the movement contribution vector:
(sqrt(ds^2-dy^2) - (df[x=a,y=b]/dy) / (df[x=a,y=b]/dx) * sqrt(ds^2-dx^2), sqrt(ds^2-dx^2) - (df[x=a,y=b]/dx) / (df[x=a,y=b]/dy) * sqrt(ds^2-dy^2))
As the contribution of dx and dy goes to zero, the movement contribution vector becomes:
(ds - (df[x=a,y=b]/dy) / (df[x=a,y=b]/dx) * ds, ds - (df[x=a,y=b]/dx) / (df[x=a,y=b]/dy) * ds) or
ds * (1 - (df[x=a,y=b]/dy) / (df[x=a,y=b]/dx), 1 - (df[x=a,y=b]/dx) / (df[x=a,y=b]/dy))
If f(x,y) = r^2-x^2-y^2 = 0, the vector becomes ds*(1 - (-2*b)/(-2*a), 1 - (-2*a)/(-2*b))
and to find a way to arc length parameterize any function, we want to find a transformation of the non-arc length parameterized circle giving the arc length parameterized circle:
g(x(t), y(t)) = (r*cos(t), r*sin(t)), which has the movement contribution vector:
dt*(1 - (dg[x,y]/dy[t=k]) / (dg[x,y]/dx[t=k]), 1 - (dg[x,y]/dx[t=k]) / (dg[x,y]/dy[t=k])) = dt*(1 - (r cos(k))/(-r*sin(k)), 1 - (-r*sin(k))/(r*cos(k))) = dt*(cot(k)+1, tan(k)+1)
Does it make sense?