The programs must be sent to the TA as MATLAB-scripts.
Part 1: Boundary Tracing (4 points)
The natural follow up to assignment 6:
Write a matlab FUNCTION that
converts the boundary created by assignment 5 into a polygonal curve, defining
each point of the boundary as a vertex of the polygon. Neighboring boundary points
are subsequent vertices in the polygon.
How to:
Part 2: Polygon Visualisation (1 point)
Write a matlab FUNCTION 'showPolygon' (you will need this one frequently in follow up assignments) displaying the
polygonal curve.
The function should take the following parameters:
function showPolygon(polygon, close)
% input: polygon: n x 2 matrix of vertex-coordinates
% optional parameter close:
% if set to 0, do NOT close (=connect last and first point) polygon
% else (incl. []): close polygon (=default)
An example output of this function could look like this:
Have fun !