If one "glues" together a cylinder $C$ with a cylinder $C'$ the resulting space should be a torus as a subspace of $\mathbb R^3$. Both $C$ and $C'$ are $S^1 \times [0,1]$. If I understand it correctly the identification requires two maps $f: C \to \mathbb R^3$ and $g: C' \to \mathbb R^3$ with the property that $f(x)=g(x) \in S^1 \subseteq \mathbb R^3$ on $S^1 \times \{0\}$ and $f(x)=g(x) \in S^1 \subseteq \mathbb R^3$ on $S^1 \times \{1\}$ such that $f,g$ are continuous and one-to-one.
What I'm struggling with is how to define $f$ and $g$. I tried as follows: My idea is to define $f$ and $g$ such that they are inclusion maps into the torus at the origin of $\mathbb R^3$. The torus can be parameterized as $x = \cos(s)(R+r\cos(t))$, $y=\sin(s)(R+r\cos(t))$, $z=r\sin(t)$ for $s,t \in [0,2\pi)$.
For a point $(x,y)$ on $C$ how to define $f:C \to \mathbb R^3$? I can not do it. Thank you for any help!!