Torus equation in terms of tangent

177 Views Asked by At

So if I have an equation for a torus in $F(a,b) = (X, Y, Z)$ where $X = (R + r\cos a)\cos b$ and $0 < r < R$, how would I go about rewriting this equation for $X$ in terms of $\tan(a/2)$ and $\tan(b/2)$? I'm having a hard time doing the conversion. This might seem like an odd question but it's just the first step to a larger problem I'm working on but once I got this I'm good to go.