A distance function of circles outgoing from the center while shifting at constant rates towards the positive Y axis

euclidean-geometryfunctionsgeometrytrigonometry

enter image description here

I have the following problem: I want a distance equation that depending on the X and Y Coordinates will give me a distance to the circle center.
The circle center is drifting towards a certain direction, let's just say the positive Y direction, as the distance from the center increases.

The images I provided should make this clearer. The first two images show the X and the Y coordinate values respectively. The brighter the pixel the higher the value. The value 0 is assigned to black, which means that unfortunately negative values can't be displayed. For example the left side of the first iamge is completely black, but this is because the values are all negative not because X is 0.
To make visualization easier I used a rounding function, which rounds every value up to the nearest multiple of 0.1.

The third image shows the distance function of a circle when the origin is fixed at (0,0).
This is the simplest case, as it only requires the use of the pythagorean theorem.

The third image shows what I have been able to derive so far: The circle center moves towards the positive Y axis exactly by the distance between the circle center and the point at which the distance function is evaluated.

To get this function I used the fact that the distance of the point to the center and the distance of the center to the point (0,0) are equal:

enter image description here

(The red point is the point where the distance function is evaluated)

Using this I derived the equation below image five (the rightmost image).
One interesting thing of the equation that I derived is that it is symmetric around the X axis, which is something that I didn't intend but don't mind.
The distance function when mapped to the XY plane now looks like circles emenating from point (0,0).

Now comes my question: What would an equation for the fourth image be and how would you derive it?
As you can see when mapping the distance function it should look like the the circle origin moves along the postive Y axis such that when going in the negative Y direction the distance function increases by a constant amount.

Thank you and have a great day!

Best Answer

Let's say the rate of vertical drift is $\alpha$, and the rate of radius change is $\beta$. The circle has centre $\vec c=(0,\alpha t)$ and radius $r=\beta t$ where $t$ is time.

A generic point $(x,y)$ on the circle has

$$\lVert(x,y)-\vec c\rVert^2=r^2$$ $$x^2+(y-\alpha t)^2=(\beta t)^2$$ $$x^2+y^2-2\alpha yt+(\alpha^2-\beta^2)t^2=0$$

Solving for $t$ with the quadratic formula, we get

$$t=\frac{2\alpha y\pm\sqrt{4\alpha^2y^2-4(\alpha^2-\beta^2)(x^2+y^2)}}{2(\alpha^2-\beta^2)}$$ $$=\frac{\alpha y\pm\sqrt{(\beta^2-\alpha^2)x^2+\beta^2y^2}}{\alpha^2-\beta^2}$$

So the radius as a function of $x$ and $y$ is

$$r=\beta t=\frac{\beta}{\alpha^2-\beta^2}\Big(\alpha y\pm\sqrt{(\beta^2-\alpha^2)x^2+\beta^2y^2}\Big)$$

It looks like you have the drift being smaller than the radius change: $\alpha<\beta$. And the radius should be positive. So we can find the proper signs in that formula:

$$r=\frac{\beta}{\beta^2-\alpha^2}\Big(-\alpha y\mp\sqrt{(\beta^2-\alpha^2)x^2+\beta^2y^2}\Big)$$

The lower sign should be taken; otherwise $r$ would be negative for some values of $x$ and $y$.

$$r=\frac{\beta}{\beta^2-\alpha^2}\Big(-\alpha y+\sqrt{(\beta^2-\alpha^2)x^2+\beta^2y^2}\Big)$$

(This is indeed always positive, because $(\beta^2-\alpha^2)x^2+(\beta^2-\alpha^2)y^2>0$ (except at the origin $x=y=0$).)

Related Question