Potential energy depends on:
position of the object
shape of the object
Potential energy is the energy which is there in a body due to its state of rest or position. This is the energy stored in the body when work is done by a force in bringing the body to that state of rest or position.
For example, a stretched bow has potential energy stored in it which is equal to the amount of work done in stretching the bow. Similarly, when a body is taken from the earth surface to a height, work has to be done on the body against the force of gravity on it. This work done is stored in the form of its potential energy.