Dimension Agnostic Physics Engine