ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 27 May 2016 16:08:03 -0500How to define a graph using Cartesian coordinateshttps://ask.sagemath.org/question/33565/how-to-define-a-graph-using-cartesian-coordinates/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:
1. How do I input a graph into Sage where the vertices are described as Cartesian coordinates (3-tuples)?
2. Is there a pre-defined function in Sage for computing the Euclidean distance between two Cartesian coordinates?
JEAFri, 27 May 2016 16:08:03 -0500https://ask.sagemath.org/question/33565/