2.2. Embedded CW complex
- class ect.embed_cw.EmbeddedCW[source]
A class to represent a straight-line-embedded CW complex. We assume that the coordinates for the embedding of the vertices are given, the 1-skeleton is in fact a graph (so not as general as a full CW complex) with straight line embeddings, and 2-Cells are the interior of the shape outlined by its boundary edges.
Faces should be passed in as a list of vertices, where the vertices are in order around the face. However, the ECT function will likely still work if the ordering is different. The drawing functions however might look strange. Note the class does not (yet?) check to make sure the face is valid, i.e. is a cycle in the graph, and bounds a region in the plane.
- add_from_embedded_graph(G)[source]
Adds the edges and coordinates from an EmbeddedGraph object to the EmbeddedCW object.
- Parameters:
G (EmbeddedGraph) – The EmbeddedGraph object to add from.
- add_face(*args, **kwargs)
- add_faces_from(faces)[source]
Adds a list of faces to the graph.
- Parameters:
faces (list) – A list of faces to add.
- plot_faces(theta=None, ax=None, **kwargs)[source]
Plots the faces of the graph in the direction of theta.
- Parameters:
theta (float) – The angle in \([0,2\pi]\) for the direction to sort the edges.
ax (matplotlib.axes.Axes) – The axes to plot the graph on. If None, a new figure is created.
**kwargs – Additional keyword arguments to pass to the ax.fill function.
- Returns:
- matplotlib.axes.Axes
The axes object with the plot.