The main hypothesis of this study, based on experimental data showing the relations between the BG activities and kinematic variables, is that BG are involved in computing inverse kinematics (IK) as a part of planning and decision-making. Indeed, it is assumed that based on the desired kinematic variables (such as velocity) of a limb in the workspace, angular kinematic variables in the joint configuration space are calculated. Therefore, in this paper, a system-level computational model of BG is proposed based on geometrical rules, which is able to compute IK. Next, the functionality of each part in the presented model is interpreted as a function of a nucleus or a pathway of BG. Moreover, to overcome existing redundancy in possible trajectories, an optimization problem minimizing energy consumption is defined and solved to select an optimal movement trajectory among an infinite number of possible ones. The validity of the model is checked by simulating it to control a three-segment manipulator with rotational joints in a plane. The performance of the model is studied for different types of movement including different reaching movements, a continuous circular movement and a sequence of tracking movements. Furthermore, to demonstrate the physiological similarity of the presented model to the BG structure, the neuronal activity of each part of the model considered as a BG nucleus is verified. Some changes in model parameters, inspired by the dopamine deficiency, also allow simulating some symptoms of Parkinson's disease such as bradykinesia and akinesia.