Given two circles in space, how to compute their relative position Say I have two circles in space, how can I compute whether they are in position like a chain, completely separated or intersecting at one or two points?
For example I say the circle $C_1$ on XY-plane with radius $1$ and center $(0,0,0)$ and the circle $C_2$ on YZ-plane with radius $1$ and center $(0,1,0)$ are in position like a chain.
 A: For circle $C_i$, let $P_i$ denote the plane containing containing $C_i$.  If the two circles are coplanar, then the problem is straightforward, and likewise if $P_1$ and $P_2$ are parallel but non-intersecting then the circles do not link.
Otherwise, let $L$ denote the line of intersection of $P_1$ and $P_2$.  Then the linkage property of the two circles can be determined by looking at the interlacing of the points of intersection of the two circles with $L$.  That is, $C_1$ and $C_2$ link as described if and only if each circle has two points of intersection with $L$, and the points alternate along $L$.
Topologically, this can be thought of in terms of homotopy: The two circles are linked when $C_1$ is not homotopy equivalent to a point in the space $\mathbb{R}^3 \setminus C_2$, i.e. cannot be contracted to a point without passing through $C_2$.  In this case, this is equivalent to the question of whether the closed disc $D_1$ corresponding to $C_1$ is contained in $\mathbb{R}^3 \setminus C_2$, which can be answered by restricting attention to only the points in the intersection line $L$ of the two planes.
A: Well. You can start by computing the intersection points (just by taking the two equations and searching common solutions).
For furthermore information, I think you need to put something like 2-cells on the circles in order to get more topological information.
A: Find the equations of the planes:
If the planes are parallel the circles are complete separate.
If the circles are coplanar then this is standard plane geometry (see end of post).
Otherwise find equation of the line where the planes intersect.
Determine what points if any the circles intersect the lines. If the circles share any points they intersect  those point(s).
Otherwise list the points in order that the appear on the line.
There will be the following possibilities:
1) No circle or just one circle intersects the line.  Then the circles are completely separate.
2) The two circles each intersect the line at one point in common. Then the circles intersect at one point.
3) The two circles intersect the line each at one point and the points are different.  Then the circles are complete separate.
4) One circle intersects that line at two points and the other at one point, and the one point is common to both circles.  Then the circles intersect at one point.
5) One circle intersects the line at two points and the other at a third point that is between the other two.  Then the circles are separate.  But  the second circle touches the interior of the first. 
6) One circle intersects the line at two points and the other at a third point that is exterior to the other two.  Then the circles are completely separate.
7) The two circles intersect the line at the same two points.  Then the circles intersect at two points.
8) The two circles intersect the line at two points each and have one point in common. The point in common is between the other two points.  Then the circles intersect at one point.  The circles do not touch each other's interiors.
9) The two circles intersect the line at two points each and have one point in common. The point in common is exterior other two points. Then the circles intersect at one point.  The circles do  touch each other's interiors.
10) The circles intersect the line at four distinct points.  The first two belong to one circle and the last two to the other.  Then the circles are completely separate.
11) The circles intersect the line at four distinct points, so that the two points belonging to one circle are exterior and the two belonging to the second circle are interior.  Then the circles are separate by the second circle "dips" into the first circle's interior.
12) The circles intersect the line at four distinct points.  The first and third belong to one circle and the second and fourth to the other.  The circles are linked "like a chain".
Your example is number 12) 
In your example the planes are the XY plane and the YZ plane.  The intersect  on the line that is the Y axis.
Circle one intersects the $y$ axis at $p_1=(0,1,0)$ and $p_2 =(0,-1,0)$.  circle two intersects at $q_1 = (0,0,0)$ and $q_2=(0,2,0)$. In order they are $p_2, q_1, p_1, q_2$.  So the two circles don't intersect but are linked.
A: The case of interlocking (like rings in a chain) is the most tricky ; it necessitates the use of a specific operator,  the linking number (https://en.wikipedia.org/wiki/Linking_number) given by formula :
$$\dfrac{1}{4\pi}\int_{s=0}^{2 \pi}\int_{t=0}^{2 \pi}\dfrac{det(\tfrac{d\gamma_1(s)}{ds},\tfrac{d\gamma_2(t)}{dt},\gamma_1(s)-\gamma_2(t))}{|\gamma_1(s)-\gamma_2(t)|^3}dsdt$$
which is equal to $1$ or $-1$ if and only if there is an interlocking case. 
($\gamma_1$ and $\gamma_2$ being 3D column vectors parametrization of the circles).
