Forward and Inverse Kinematics Cpp Code