(R^3) As Two Solid Tori

We would like a nice visual representation depicting 3-dimensional Euclidean space as being made up of two tori (well, really it is the 3-Sphere which is the union of two tori). To do this we will first look at a Clifford Torus, specifically we will start by focusing our attention on the set of (x,y,z,w) ∈ (S^3) such that 

(x^2)+ (y^2) = (1/2) = (z^2)+ (w^2).  

And then through some rotations in 4-dimensional Euclidean space together with projecting into 3-dimensional space using stereographic projection, we will see how we can partition (R^3) into two congruent pieces using a deformed (hollow) torus minus a point, as our dividing surface.

(*  
First we define a function that we will use to project (S^3)\{(0,0,0,-1)} onto (R^3)

Since we will be looking at the Clifford Torus sitting inside (S^3), we have (after some simple algebra) that the stereographic projection function is given by the following expression.  
*)
proj[x_,y_,z_,w_]:= {(x/((Sqrt[2])+w)), (y/((Sqrt[2])+w)), (z/((Sqrt[2])+w))}

(*
We parameterize the above mentioned Clifford Torus by (Cos(s), Sin(s), Cos(t), Sin(t)) notice that we dont have to do any scaling here to ensure that we lie in (S^3), this is because the scaling was accounted for in the function, proj, defined above.

Plotting this guy yields the following surface
*)
ParametricPlot3D[
proj[Cos[s], Sin[s], Cos[t], Sin[t]],
{s, 0,2π},{t, 0, 2π}, 
PlotRange-> {{-5,5},{-5,5},{-5,5}}
]

(*
Now if we perform a rotation in (R^4) by an angle of π/2 in the yw-plane, this amounts to mapping 

(x,y,z,w) -> (x,-w,z,y).

After performing this transformation and projecting the Clifford Torus from (S^3) into (R^3) we get the following surface. 
*)
ParametricPlot3D[proj[Cos[s], -Sin[t], Cos[t], Sin[s]],{s, 0,2π},{t, 0, 2π}, PlotRange-> {{-5,5},{-5,5},{-5,5}}]

(*
Evidently the torus changed orientation, in particular, we can see how the torus went about changing its orientation by looking at intermediate stages of the above rotation in the yw-plane, namely, before mapping to (R^3) via stereographic projection, we first apply the transformation 

(x,y,z,w) -> (x, Cos(u)*y - Sin[u]*w, z, Sin(u)*y +Cos(u)*w),

 where 0 ≤ u ≤ π/2. To explicitly see the transformation we, stick all of this into the Manipulate function, and we get the following graphic. 

In particular, we find that at u = π/4 and u = 3π/4, the tori from the figures above have been deformed so that they divide (R^3) into to symmetric pieces, namely the two solid tori we wanted.

The graphic below starts with the rotation angle slightly less than π/4. 
*)
Manipulate[ParametricPlot3D[proj[Cos[s],Cos[u]Sin[s] - Sin[u]Sin[t] , Cos[t],Sin[u]Sin[s] +Cos[u]Sin[t]],{s, 0,2π},{t, 0, 2π}, PlotRange-> {{-5,5},{-5,5},{-5,5}}, PlotStyle -> {Opacity[0.9]}], {{u, π/4 -0.0000001}, 0, π}]

(*
Finally the following graphic shows these toric leaves from one half of the partition of (R^3) together with their dual counterpart leaves from the other half.
*)
Manipulate[ParametricPlot3D[{proj[Cos[s],Cos[u]Sin[s] - Sin[u]Sin[t] , Cos[t],Sin[u]Sin[s] +Cos[u]Sin[t]],proj[Cos[s],Cos[(π/2)-u]Sin[s] - Sin[(π/2)-u]Sin[t] , Cos[t],Sin[(π/2)-u]Sin[s] +Cos[(π/2)-u]Sin[t]]},{s, 0,2π},{t, 0, 2π}, PlotRange-> {{-5,5},{-5,5},{-5,5}}, PlotStyle-> {Directive[Opacity[0.8], Red,Specularity[White, 20]], Directive[Opacity[0.8], Blue, Specularity[White, 20]]},
Mesh -> None], {{u, 3π/16}, π/8, 3π/8}]