State factor on which the position of the center of gravity of a body depend? Explain your answer with an example.