In this paper, we give theoretical foundations for modeling distance functions on the usual Euclidean space R exp. n, where distance may refer to physical kilometers, liters of fuel consumed, time spent in traveling, or transportation cost. In our approach, a distance function d is derived from a function F0 called the fundamental function of d. Our distance functions, unlike metrics, can be asymmetric and non-positive definite, and unlike the Lp norms, they can be nonuniform. We illustrate our theoretical framework by modeling an asymmetric and non-uniform distance function on R2 which can take negative values.