Example of a 3D surface mesh and its 2D parameterization.
Files to download today
- PS3.zip: Mesh data and
an basic template code.
Instructions
The zip package includes the following 3 directories:
- data: This directory contains several
example graphs on which you can test your
implementation. Each graph consists of 2 files: the
first, which represents a list of edges (a matrix with
2 columns) and the second, which represents the set of
boundary vertices with their coordinates.
Recall from the lecture that for Tutte's algorithm, we
have to specify a set of boundary vertices and their
coordinates in 2D on a convex boundary. To make your
life easier the boundary is already pre-computed for
the graphs that you'll consider. Each file
describing the boundary is represented as a matrix
with 3 columns, where the first column stores the ids
of the boundary vertices, while the second and third
store their x and y coordinates respectively.
- external This directory contains two files
that will be useful in displaying your results. Most
importantly, the function
plot_graph_wboundary takes as input a list of
edges of the graph (in the same format as given by the
data files), the x and y coordinate
of each of the vertices and the list of boundary
vertex ids and draws the graph with black internal
edges and red boundary edges.
- code . You should use this directory to store
and organize your code. By default it only contains
one file: draw_planar_graph.m which will help you
to get started with your implementation.