I am trying to figure out (1) how to input a graph into Sage where the vertices are described as Cartesian coordinates (3-tuples), and then (2) for each pair of vertices, compute the Euclidean distance between the two and, if the Euclidean distance is some fixed value $d$, add an edge between these two vertices.
Specifically, here are my questions:
- How do I nput a graph into Sage where the vertices are described as Cartesian coordinates (3-tuples)?
- Is there a pre-defined function in Sage for computing the Euclidean distance between two Cartesian coordinates?