I have a location of a tool with respect to the base. That location is described by an x,y,z coordinates and three rotations. I call that $Target$. I want to make a geometrical approach on the first three angles. I first have to remove some parts of my target to get it to the wrist and also remove the base. This. First I remove the base, then the wrist to tool(TWT) and lastly the frame 6 wrist(T6T). Then you end up with transformation from 0 to 6 (T60). There are 6 frames.
Essentially we did this
$T06=TB0^{-1}\cdot target \cdot TWT^{-1} \cdot T6W^{-1}$
When I as shown in the figure, when theta 1 is calculated for it makes athis equation.
$\theta_1=tan^{-1}(y/x)$
This gave the wrong answer. Since the trigonometry was straightforward, my hunch is that the above statement where we changed the transformation was at fault. Did we do it correctly is my question.