On Mon, 19 Jun 2023 at 14:27, Dima Pasechnik <dimp...@gmail.com> wrote:
> One can do something like this; start from your graph G, take > D=G.planar_dual(), in D take a spanning tree, and starting from the > root of the tree, > and orientation chosen in the face corresponding to the root, proceed > recursively to induce orientations on the adjacent faces. > OK, though that is quite complicated. Right now I am just checking that the faces I am given by G.faces() are consistently oriented. If/when I come across a case where theya re not, I will work out which subset of them needs to have its orientation flipped. John > > > > On Mon, Jun 19, 2023 at 2:00 PM Dima Pasechnik <dimp...@gmail.com> wrote: > > > > oh, right, what I suggested isn't what you asked for, sorry. > > > > > > On Mon, 19 Jun 2023, 13:56 John Cremona, <john.crem...@gmail.com> wrote: > >> > >> Thanks Dima for the suggestion. I'm not sure that this does what I > need: the associated directed graph has each edge directed, which is not > what I was needing, and the faces of the directed graph look identical to > those of the original -- in particular, the edges of each face are tuples > (x,y) where both (x,y) and (y,x) appear on different faces (as I need to > always hold) regardless of the orientation of the edges. > >> > >> I will keep on experimenting. My polyhedra are small and few enough > that check the orientations of each is not very time-consuming. > >> > >> John > >> > >> On Monday, June 19, 2023 at 12:08:18 PM UTC+1 Dima Pasechnik wrote: > >>> > >>> On Mon, Jun 19, 2023 at 11:18 AM John Cremona <john.c...@gmail.com> > wrote: > >>> > > >>> > I have some quite small graphs which are polyhedral, each is the > 1-skeleton of a (connected convex) polyhedron such as a cube, tetrahedron, > etc, constructed from a list of edge pairs. > >>> > > >>> > I can get the faces of one of these, say G, via G.faces(). This > returns a list of lists of vertices, each one being a list of the vertices > of one face in some cyclic order. So each face in the list has an implied > orientation. OK so far. > >>> > > >>> > What I want is for the orientations of the different faces to be > coherent, coming from a single orientation of the surface. Expliticly that > means that each edge xy, which will appear in exactly two faces, appears > once in each direction, i.e. x before y (cyclically) in one and the other > way round in the other. > >>> > > >>> > It is possible that G.faces() is already returning such a globally > oriented list of faces, as experimentation suggests, but I need to be > certain -- otherwise I can write code to check and if necessary reverse > some faces. I would prefer not to have to though. > >>> > > >>> > The docstrong of G.faces() does not make this clear (at least not to > me). > >>> > >>> You can call G.strong_orientation() > >>> to get an orientation of the edge of your graph, and use it. > >>> > >>> HTH > >>> Dima > >>> > >>> > > >>> > -- > >>> > You received this message because you are subscribed to the Google > Groups "sage-support" group. > >>> > To unsubscribe from this group and stop receiving emails from it, > send an email to sage-support...@googlegroups.com. > >>> > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/CAD0p0K5e9ch3tgrM2RAHxQieVOqG%2BEX37fyWj7BwF0ns-NTPpA%40mail.gmail.com > . > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups "sage-support" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an email to sage-support+unsubscr...@googlegroups.com. > >> To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/08ace3c1-1e96-427a-97a1-53605ca42742n%40googlegroups.com > . > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sage-support" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sage-support/5GmwK-v-UWY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > sage-support+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/CAAWYfq1Rd%2BOmDBLY9x4ZZFn99WFrGShS98%2BPc39zHfw4jcgZvA%40mail.gmail.com > . > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAD0p0K5rZaZ2o4Kg2qukMb4v%3DqutXHN9QNLUWyrNzSjUfoECcA%40mail.gmail.com.