Still a little confused by your explanation, but I think what you’re trying to figure out is this: given two positions of distance d (representing a radius of a sphere between the two points), with one of them missing a coordinate (y) and the other one being complete, you want to figure out that missing coordinate (y).
If this is the case, you can use geometry for this.
Let’s say the origin position (the vector you know all of the coordinates for) is VectorA, and the radius position is VectorB. VectorA’s coordinates are (a, b, c), and VectorB’s coordinates are (x, y, z), respectively. We will call the radius r.
With all of that information, we can now use the equation for the sphere:
(x-a)^2 + (y-b)^2 + (z-c)^2 = r^2
Since we know x, a, b, z, c, and r, we can simply solve for y using algebraic rules yielding the equation:
y = SQUAREROOTOF(r^2 - (x-a)^2 - (z-c)^2) + b
Let’s try an example.
The origin of the first sphere is at (2, 2, 2). The second position is at (2, y, 3). The radius is 2.
If we plug values into the equation:
y = SQUAREROOTOF(2^2 - (2-2)^2 - (3-2)^2) + 2
This would yield two values of ~ 0.27, and 3.73.
Getting 2 y values makes sense because as seen by your picture in the original post, the line you drew goes through the circle twice, implying two values of y satisfy the equation.
Hopefully I answered your question and this made sense. Also, I may have messed up on the math along the way, so if there are any calculation errors, let me know! The equations should be correct, though.
Also, keep in mind that the radius value MUST be a correct size that will satisfy the x and z coordinates, or else this won’t work. For example, if you have x and z offset values of 200 and 400 respectively, you can’t have a radius value of 1.