A treatise on statics with applications to physics