Research ArticleOpen accessEvery word in the titleA Generalized Algorithm for the Gravitational Potential of a Homogeneous CuboidThunendran Periyandy, Michael BevisThis paper presents a mathematical formulation for computing the gravitational potential of a cuboid (or right rectangular prism) with uniform density. The resulting analytical expressions are valid inside, on and outside the cuboid. The methodology systematically organizes logarithmic and arctangent terms using a hexagonal graph approach, promoting numerical stability and correct sign allocation. We provide a structured pseudocode algorithm to … …Physics International, Vol. 16, Issue 1 · 28 Nov 2025 · 3,171 accessesView PDFCite