Function File: shape = polygon2shape (polygon)

Converts a polygon to a shape with edges defined by smooth polynomials.

polygon is a N-by-2 matrix, each row representing a vertex. shape is a N-by-1 cell, where each element is a pair of polynomials compatible with polyval.

In its current state, the shape is formed by polynomials of degree 1. Therefore the shape representation costs more memory except for colinear points in the polygon.

See also: shape2polygon, simplifyPolygon, polyval.

Package: geometry