Structures from Distances in Two and Three Dimensions using Stochastic Proximity Embedding