We can extend the solution method to solve for the X and Y coordinate position of the robotic wrist joint. Once the position of the elbow joint is known, two more pieces of information are required to locate the wrist:
The rbtjnts.cpp program can also be modified to compute the wrist position. First of all appropriate variable declarations need to be added to the program near the declarations already in place. The new variable declarations would probably look something like this:
float forearml; float elbowd, elbowr; float wristx, wristy;
where:
We must not forget to include comments in the program that describe these new variables.