Sign inSubmit
ArticleMetrics
Research Article · Open access · Published 28 November 2025

A Generalized Algorithm for the Gravitational Potential of a Homogeneous Cuboid

Thunendran Periyandy1,2 & Michael Bevis1

Physics International, Volume 16, Issue 1, pp. 7–17 · doi.org/10.3844/pisp.2025.7.17

3,171 accesses1,924 downloads4 citations (Crossref)Metrics
Cite Check for updates

Abstract

This 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 facilitate computational implementation, and actual codes written in Python, Matlab and Julia. We also introduce a test, that we call a Laplacian test, used to validate our algorithm and codes. Keywords: Gravitational Potential, Cuboid, Hexagonal Graph, Finite Differences, Laplacian Test.

Licence and reuse

Open access. This article is licensed under a Creative Commons Attribution 4.0 International Licence (CC BY 4.0), as printed on the article, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original authors and the source. No permission is needed.

How to reuse this article

Responses (0)

Have a comment on this research? Sign in to respond. Responses are moderated and published with your name and affiliation; the authors are invited to reply. How we use your dataWrite a response

About this article

Cite this article

Periyandy, T. & Bevis, M. (2025). A Generalized Algorithm for the Gravitational Potential of a Homogeneous Cuboid. Physics International, 16(1), 7–17. https://doi.org/10.3844/pisp.2025.7.17

Licence
CC BY 4.0
Issue
Volume 16, Issue 1
Policies
Editorial independenceUse of generative AIData availabilityAppeals and complaints
Version
Version of record
A Generalized Algorithm for the Gravitational Potential of a Homogeneous CuboidPhysics International · Volume 16, Issue 1 · pp. 7–17 · CC BY 4.0Download