You can generate vertices in as points in space (choose your dimension), then make edge weights as the Euclidean (or Manhattan, or...) distance between any pair of vertices with an edge between them. As a final step, ignore the locations of the vertices and just embed in two or three dimensions.