# doc-cache created by Octave 10.2.0
# name: cache
# type: cell
# rows: 3
# columns: 35
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
beltProblem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1323
 -- Function File: [TANGENT,INNER] = beltProblem (C, R)
     Finds the four lines tangent to two circles with given centers and
     radii.

     The function solves the belt problem in 2D for circles with center
     C and radii R.

     *INPUT*
     C
          2-by-2 matrix containig coordinates of the centers of the
          circles; one row per circle.
     R
          2-by-1 vector with the radii of the circles.

     *OUPUT*
     TANGENT
          4-by-4 matrix with the points of tangency.  Each row describes
          a segment(edge).
     INNER
          4-by-2 vector with the point of intersection of the inner
          tangents (crossed belts) with the segment that joins the
          centers of the two circles.  If the i-th edge is not an inner
          tangent then ‘inner(i,:)=[NaN,NaN]’.

     Example:

          c         = [0 0;1 3];
          r         = [1 0.5];
          [T inner] = beltProblem(c,r)
          ⇒ T =
           -0.68516   0.72839   1.34258   2.63581
            0.98516   0.17161   0.50742   2.91419
            0.98675  -0.16225   1.49338   2.91888
           -0.88675   0.46225   0.55663   3.23112

          ⇒ inner =
            0.66667   2.00000
            0.66667   2.00000
                NaN       NaN
                NaN       NaN

     See also: edges2d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
Finds the four lines tangent to two circles with given centers and
radii.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
clipPolygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2084
 -- [OUTPOL, NPOL] = clipPolygon (INPOL, CLIPPOL, OP)
 -- [OUTPOL, NPOL] = clipPolygon (INPOL, CLIPPOL, OP, LIBRARY)
 -- [OUTPOL, NPOL] = clipPolygon (..., ARGS)
     Perform boolean operation on polygon(s) using one of several
     algorithms.

     INPOL = Nx2 matrix of (X, Y) coordinates constituting the
     polygons(s) to be clipped (subject polygons).  Polygons are
     separated by [NaN NaN] rows.

     CLIPPOL = another Nx2 matrix of (X, Y) coordinates representing the
     clip polygon(s).
     CLIPPOL can also be a vector containing the bottom left and upper
     right coordinates of a clipping rectangle, or bounding box, in the
     format
     [xmin xmax ymin ymax].

     The argument OP, the boolean operation, can be either an integer or
     a string.  In the case of integer it should be between 0 and 3,
     correspoding to:

        • 0: difference INPOL - CLIPPOL

        • 1: intersection ('AND') of INPOL and CLIPPOL (= default)

        • 2: exclusiveOR ('XOR') of INPOL and CLIPPOL

        • 3: union ('OR') of INPOL and CLIPPOL

     If OP is a string should be one of 'diff', 'and', 'xor', 'or', the
     parsing of this option is case insensitive, i.e.  'AND' is the same
     as 'and'.

     The optional argument LIBRARY specifies which library to use for
     clipping.  Currently 'clipper' and 'mrf' are implemented.  Option
     'clipper' uses a MEX interface to the Clipper library, option 'mrf'
     uses the algorithm by Martinez, Rueda and Feito implemented with
     OCT files.
     Each library interprets polygons as holes differently, refer to the
     help of the specific function to learn how to pass polygons with
     holes.

     Output array OUTPOL will be an Nx2 array of polygons resulting from
     the requested boolean operation, or in case of just one input
     argument an Nx1 array indicating winding direction of each
     subpolygon in input argument INPOL.

     Optional output argument NPOL indicates the number of output
     polygons.

     See also: clipPolygon_clipper, clipPolygon_mrf, clipPolyline.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
Perform boolean operation on polygon(s) using one of several algorithms.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
clipPolygon_clipper


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2648
 -- [OUTPOL, NPOL] = clipPolygon_clipper (INPOL, CLIPPOL)
 -- [OUTPOL, NPOL] = clipPolygon_clipper (INPOL, CLIPPOL, OP)
 -- [OUTPOL, NPOL] = clipPolygon_clipper (INPOL, CLIPPOL, OP, RULES,
          RULEC)
     Perform boolean operation on polygon(s) using the Clipper library.

     INPOL = Nx2 matrix of (X, Y) coordinates constituting the
     polygons(s) to be clipped.  Polygons are separated by [NaN NaN]
     rows.  CLIPPOL = another Nx2 matrix of (X, Y) coordinates
     representing the clip polygon(s).

     Optional argument OP, the boolean operation, can be:

        • 0: difference INPOL - CLIPPOL

        • 1: intersection ("AND") of INPOL and CLIPPOL (= default)

        • 2: exclusiveOR ("XOR") of INPOL and CLIPPOL

        • 3: union ("OR") of INPOL and CLIPPOL

     In addition a rule can be specified to instruct polyclip how to
     assess holes, or rather, how to assess polygon fill.  This works as
     follows: start with a winding number of zero (0).  From a point
     outside all polygons specified in INPOL, go to the center of the
     innermost polygon and note which polygons are crossed.  For each
     polygon boundary crossing from right to left, increase the winding
     number, while for each polygon crossing from left to right,
     decrement it, and then assign it to the crossed polygon.  RULES and
     RULEC can be set individually for subject and clip polygons,
     respectively, as follows:

        • 0 Even-Odd, also called Alternate (= default): The first
          polygon crossed specifies the outer boundary of a filled
          polygon, the next polygon (if present) specifies the inner
          boundary of that filled polygon, and so on.  Winding direction
          (clockwise or counterclockwise) is irrelevant here.

        • 1 Non-Zero: All polygons with a non-zero winding number are
          filled.

        • 2 Positive: All polygons with a winding number > 0 are filled.
          This is the usual setting for counterclockwise polygons to be
          the outer, and clockwise polygons to be the inner boundary
          ("holes") of complex polygons.

        • 3 Negative: All polygons with a winding number < 0 are filled.
     (for details see [1])

     Output array OUTPOL will be an Nx2 array of polygons resulting from
     the requested boolean operation, or in case of just one input
     argument an Nx1 array indicating winding direction of each
     subpolygon in input argument INPOL.

     [1]:
     <http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Types/PolyFillType.htm>

     See also: clipPolygon_mrf,clipPolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Perform boolean operation on polygon(s) using the Clipper library.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
clipPolygon_mrf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2013
 -- [OUTPOL, NPOL] = clipPolygon_mrf (INPOL, CLIPPOL)
 -- [OUTPOL, NPOL] = clipPolygon_mrf (INPOL, CLIPPOL, OP)
     Perform boolean operation on polygon(s) using the algorithm by
     Martinez, Rueda and Feito.

     INPOL = Nx2 matrix of (X, Y) coordinates constituting the
     polygons(s) to be clipped (subject polygon).  CLIPPOL = Nx2 matrix
     of (X, Y) coordinates representing the clip polygon(s).

     Polygons may have multiple non-intersecting regions.  The contours
     are separated by [Nan NaN] rows.  Polygons may also contain holes.
     Holes are defined as the region enclosed within the boundaries of
     polygon which are not part of the polygon region.  Here again, the
     inner and outer contours are separated by [Nan NaN] rows.
     Specifically, if a contour is lying inside another contour, it is
     automatically treated as a hole.

     The following features are allowed in input polygons:

        • 0: Contours can be described in clockwise or counterclockwise
          order.

        • 1: Holes.

        • 2: A vertex of a polygon can touch (in a point) a vertex or
          edge of the same polygon.

        • 3: Self-intersecting polygons.

     The following features are not allowed in input polygons:

          The intersection of two edges of the same polygon can be a
          point, but cannot be a segment.

     The argument OP, the boolean operation, can be:

        • 0: difference INPOL - CLIPPOL

        • 1: intersection ("AND") of INPOL and CLIPPOL (= default)

        • 2: exclusiveOR ("XOR") of INPOL and CLIPPOL

        • 3: union ("OR") of INPOL and CLIPPOL

     Output array OUTPOL will be an Nx2 array of polygons resulting from
     the requested boolean operation

     Optional output argument NPOL indicates the number of output
     polygons.

     Know more about the algorithm by Martinez, Rueda and Feito[1].

     [1]: <http://www4.ujaen.es/~fmartin/bool_op.html>

     See also: clipPolygon_clipper,clipPolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Perform boolean operation on polygon(s) using the algorithm by Martinez,
Rued...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
clipPolyline


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 914
 -- OLINE = clipPolyline (INPOL, CLIPPOL, OP)
     Clip (possibly composite) polylines with polygon(s) using one of
     boolean methods.

     INPOL = Nx2 matrix of (X, Y) coordinates constituting the
     polylines(s) to be clipped.  Polyline sections are separated by
     [NaN NaN] rows.  CLIPPOL = another Nx2 matrix of (X, Y) coordinates
     representing the clip polygon(s).  CLIPPOL may comprise separate
     and/or concentric polygons (the latter with holes).

     The argument OP, the boolean operation, can be:

        • 0: difference INPOL - CLIPPOL

        • 1: intersection ("AND") of INPOL and CLIPPOL (= default)

     Output array OLINE will be an Nx2 array of polyline sections
     resulting from the requested boolean operation.

     The optional argument LIBRARY specifies which library to use for
     clipping.  Currently only "clipper" is implemented.

     See also: clipPolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Clip (possibly composite) polylines with polygon(s) using one of boolean
meth...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
clipPolyline_clipper


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 874
 -- Function File: [OLIN, NLIN] = clipPolyline_clipper (INLIN, CLIPPOL)
 -- Function File: [OLIN, NLIN] = clipPolyline_clipper (INLIN, CLIPPOL,
          OP)
     Clip (possibly composite) polylines with polygon(s) using one of
     boolean methods.

     INPOL = Nx2 matrix of (X, Y) coordinates constituting the
     polylines(s) to be clipped.  Polyline sections are separated by
     [NaN NaN] rows.  CLIPPOL = another Nx2 matrix of (X, Y) coordinates
     representing the clip polygon(s).  CLIPPOL may comprise separate
     and/or concentric polygons (the latter with holes).

     Optional argument OP, the boolean operation, can be:

        • 0: difference INPOL - CLIPPOL

        • 1: intersection ("AND") of INPOL and CLIPPOL (= default)

     Output array OLINE will be an Nx2 array of polyline sections
     resulting from the requested boolean operation.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Clip (possibly composite) polylines with polygon(s) using one of boolean
meth...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
cov2ellipse


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 697
 -- Function File: ELLIPSE = cov2ellipse (K)
 -- Function File: [RA RB THETA] = cov2ellipse (K)
 -- Function File: ... = cov2ellipse (..., tol,TOL)
     Calculates ellipse parameters from covariance matrix.

     K must be symmetric positive (semi)definite.  The optional argument
     ‘tol’ sets the tolerance for the verification of the
     positive-(semi)definiteness of the matrix K (see ‘isdefinite’).

     If only one output argument is supplied a vector defining a ellipse
     is returned as defined in ‘ellipses2d’.  Otherwise the angle THETA
     is given in radians.

     Run ‘demo cov2ellipse’ to see an example.

     See also: ellipses2d, cov2ellipse, drawEllipse.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Calculates ellipse parameters from covariance matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
curve2polyline


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1280
 -- Function: POLYLINE = curve2polyline (CURVE)
 -- Function: POLYLINE = curve2polyline (...,PROPERTY,VALUE,...)
     Adaptive sampling of a parametric curve.

     The CURVE is described as a 2-by-N matrix.  Rows correspond to the
     polynomial (compatible with ‘polyval’) describing the respective
     component of the curve.  The curve must be parametrized in the
     interval [0,1].  The vertices of the polyline are accumulated in
     regions of the curve where the curvature is higher.

     *Parameters*
     ‘'Nmax'’
          Maximum number of vertices.  Not used.
     ‘'Tol'’
          Tolerance for the error criteria.  Default value ‘1e-4’.

          Currently the area of the smaller triangle formed by three
          consecutive points on the curve is considered.  When this area
          is smaller than tolerance the points are colinear, and hence
          no more sampling between these points is needed.

     ‘'MaxIter'’
          Maximum number of iterations.  Default value ‘10’.
     ‘'Method'’
          Not implemented.

     This function is based on the algorithm described in L. H. de
     Figueiredo (1993).  "Adaptive Sampling of Parametric Curves".
     Graphic Gems III.

     See also: shape2polygon, curveval.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Adaptive sampling of a parametric curve.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
curveval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 -- Function File: P = curveval (CURVE, T)
     Evaluates parametric CURVE at T.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Evaluates parametric CURVE at T.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
data2geo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 532
 -- Function File: FILESTR = data2geo (DATA, LC)
 -- Function File: FILESTR = data2geo (..., PARAM, VALUE)
     Uses data to build a file compatible with Gmsh.

     DATA is assumed to describe a polygon in ‘polygon2d’ format.  The
     argument LC specifies the edge size.

     The optional parameters can be 'output' followed with a string
     specifying a file to write, and 'spherical' followed by a real
     number R indicating that the polygon describes a spherical surface
     of radious R.

     See also: polygon2d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Uses data to build a file compatible with Gmsh.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
drawFilledPolygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 991
 -- Function: drawFilledPolygon (P)
 -- Function: drawFilledPolygon (HAX, P)
 -- Function: clipPolygon (..., PROP, VALUE, ...)
 -- Function: H = drawFilledPolygon (...)
     Draw a filled polygon.

     Add a patch representing the polygon(s) P in the current axes.

     Multiple property-value pairs may be specified, but they must
     appear in pairs.  These arguments are passed to the function
     ‘patch’.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     If P is a cell, each element of the cell is processed in sequence.

     The optional return value H is a vector of graphics handles to the
     created patch objects.

     For example:

     Draw a polygon with default filling color and red edges.

          pol = [1 2; 7 4; 4 7; 1 2; NaN NaN; 2.5 3; 5.5 4; 4 5.5; 2.5 3];
          h = drawFilledPolygon (pol, 'edgecolor', 'r');

     See also: drawPolygon, polygon2patch, patch.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Draw a filled polygon.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
ellipse2cov


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 675
 -- Function File: K = ellipse2cov (ELLI)
 -- Function File: K = ellipse2cov (RA, RB)
 -- Function File: K = ellipse2cov (..., THETA)
     Calculates covariance matrix from ellipse.

     If only one input is given, ELLI must define an ellipse as
     described in ‘ellipses2d’.  If two inputs are given, RA and RB
     define the half-lenght of the axes.  If a third input is given,
     THETA must be the angle of rotation of the ellipse in radians, and
     in counter-clockwise direction.

     The output K contains the covariance matrix define by the ellipse.

     Run ‘demo ellipse2cov’ to see an example.

     See also: ellipses2d, cov2ellipse, drawEllipse.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Calculates covariance matrix from ellipse.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
inpolyeder


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 399
 -- Function File: [IN, ON] = inpolyeder (X, Y, Z, XV, YV, ZV, DOPLOT,
          DOPLOTHELPERS)
     For a polyeder defined by vertex points ‘(XV, YV, ZV)’, determine
     if the points ‘(X, Y), Z)’ are inside or outside the polyeder.  The
     variables X, Y, Z must have the same dimension.  The optional
     output ON gives the points that are on the polyeder.

     See also: inpolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
For a polyeder defined by vertex points ‘(XV, YV, ZV)’, determine if the
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
inpolyeder2


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 411
 -- Function File: [IN, ON] = inpolyeder (X, Y, Z, XV, YV, ZV, XK, YK,
          ZK, DOPLOT, DOPLOTHELPERS)
     For a polyeder defined by vertex points ‘(XV, YV, ZV)’, determine
     if the points ‘(X, Y), Z)’ are inside or outside the polyeder.  The
     variables X, Y, Z must have the same dimension.  The optional
     output ON gives the points that are on the polyeder.

     See also: inpolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
For a polyeder defined by vertex points ‘(XV, YV, ZV)’, determine if the
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
isIntersectionInPolygon3D


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 479
 -- Function File: [IN, DISTANCE] = isIntersectionInPolygon3D (P1, P2,
          A, B, C)
     For a line, defined by two vector-points ‘(P1, P2)’, calculate the
     intersection-point with the plane, defined by three vector-points
     ‘(A, B), C)’, and determine if this intersection-point is inside or
     on the polygon defined by three vector-points ‘(A, B), C)’ The
     variables P1, P2, A, B, C are all points in the 3D-dimension.

     See also: inpolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
For a line, defined by two vector-points ‘(P1, P2)’, calculate the
inters...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
isPolygonCCW


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 729
 -- CCW = isPolygonCCW (P)
 -- CCW = isPolygonCCW (PX, PY)
     Returns true if the polygon P are oriented Counter-Clockwise.

     P is a N-by-2 array containing coordinates of vertices.  The
     coordinates of the vertices of the polygon can also be given as two
     N-by-1 arrays PX, PY.

     Optional third argument LIBRARY can be one of "geometry" or
     "clipper".  In the latter case the potentially faster Clipper
     polygon library will be invoked to assess winding directions.  The
     default is "geometry".

     If any polygon is self-crossing, the result is undefined.

     If P is a cell, each element is considered a polygon, the resulting
     CWW is a cell of the same size.

     See also: polygonArea.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Returns true if the polygon P are oriented Counter-Clockwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
isPolygonCW_Clipper


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 491
 -- Function File: [ORIENTATION] = isPolygonCW_Clipper (INPOL)
     Inspect winding direction of polygon(s).

     Based on Clipper library (polyclipping.sf.net / 3rd Party / Matlab)

     INPOL = Nx2 matrix of (X, Y) coordinates constituting the
     polygons(s) whose winding direction should be assessed.
     Subpolygons are separated by [NaN NaN] rows.

     Output argument ORIENTATION contains the winding direction(s) of
     each subpolygon: 0 for clockwise, 1 for counterclockwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Inspect winding direction of polygon(s).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
ispolyccw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 697
 -- CCW = ispolyccw (P)
 -- CCW = ispolyccw (PX, PY)
     Returns true if the polygon P are oriented Counter-Clockwise.

     P is a N-by-2 array containing coordinates of vertices.  The
     coordinates of the vertices of the polygon can also be given as two
     N-by-1 arrways PX, PY.

     If polygon is self-crossing, the result is undefined.

     If x and y contain multiple contours, either in NaN-separated
     vector form or in cell array form, ispolyccw returns a logical
     array containing one true or false value per contour.

     If POINTS is a cell, each element is considered a polygon, the
     resulting CWW array has the same shape as the cell.

     See also: polygonArea.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Returns true if the polygon P are oriented Counter-Clockwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
ispolycw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 764
 -- CCW = ispolycw (P)
 -- CCW = ispolycw (PX, PY)
     Returns true if the polygon P are oriented clockwise.

     P is a N-by-2 array containing coordinates of vertices.  The
     coordinates of the vertices of the polygon can also be given as two
     N-by-1 arrays PX, PY.

     If polygon is self-crossing, the result is undefined.

     If PX, PY contain multiple contours, either in NaN-separated vector
     form or in cell array form, ispolycw returns a logical array
     containing one true or false value per contour.

     If a contour contains two or fewer vertices, ispolycw returns true.

     If P (or PX, PY) is a cell, each element is considered a polygon,
     the resulting CW array has the same shape as the cell.

     See also: polygonArea.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Returns true if the polygon P are oriented clockwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
joinPolygons


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 430
 -- OUTPOL = joinPolygons (INPOL)
     Convert a cell style set of polygons into an array of subpolygons
     separated by NaN rows.

     INPOL is expected to be an Nx1 (column) cell array with each cell
     containing either a matrix of Mx1 (X), Mx2 (X,Y), or Mx3 (X,Y,Z)
     coordinates.

     OUTPOL is a numeric Px1, Px2 or Px3 array os subpolygons each
     separated by a row of NaN values.

     See also: splitPolygons.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert a cell style set of polygons into an array of subpolygons
separated b...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
orientPolygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 871
 -- Q = orientPolygon (P)
 -- ... = orientPolygon (P, [], DIR)
 -- [QX QY] = orientPolygon (PX, PY)
 -- ... = orientPolygon (PX, PY, DIR)
     Orient polygon counterclockwise or clockwise.

     P is a N-by-2 array containing coordinates of vertices.  The
     coordinates of the vertices of the polygon can also be given as two
     N-by-1 arrways PX, PY.  It can also be cells of polygons or NaN
     separated polygons.  The output has the same format as the input.

     The optional argument DIR can be "ccw" or "cw".  By default it
     orients polygon counterclockwise (‘DIR == "ccw"’).  To orient the
     polygon clockwise, use ‘DIR == "cw"’.

     Holes are treated as independet polygons, that is a cw polygon with
     a cw hole will be seen as two cw polygons.

     If polygon is self-crossing, the result is undefined.

     See also: isPolygonCCW.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Orient polygon counterclockwise or clockwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
plotShape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 579
 -- Function: H = plotShape (SHAPE)
 -- Function: H = plotShape (..., 'tol', VALUE)
 -- Function: H = plotShape (..., PROP, VALUE)
     Plots a 2D shape defined by piecewise smooth polynomials in the
     current axis.

     SHAPE is a cell where each elements is a 2-by-(poly_degree+1)
     matrix containing a pair of polynomials.

     The property 'Tol' sets the tolerance for the quality of the
     polygon as explained in ‘shape2polygon’.  Additional property value
     pairs are passed to ‘drawPolygon’.

     See also: drawPolygon, shape2polygon, polygon2shape.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
Plots a 2D shape defined by piecewise smooth polynomials in the current
axis.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
poly2ccw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 494
 -- Function File: [XCCW,YCCW] = poly2ccw (X,Y)
     Convert Polygons to counterclockwise contours(polygons).

     X/Y is a cell array or NaN delimited vector of polygons,
     representing the x/y coordinates of the points.  If x1 and y1 can
     contain multiple contours, represented either as NaN-separated
     vectors or as cell arrays, then each contour is converted to
     counter-clockwise ordering.  XCCW/YCCW has the same format of the
     input.

     See also: poly2cw,ispolycw.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Convert Polygons to counterclockwise contours(polygons).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
poly2cw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 485
 -- Function File: [XCW,YCW] = poly2cw (X,Y)
     Convert Polygons to clockwise contours(polygons).

     X/Y is a cell array or NaN delimited vector of polygons,
     representing the x/y coordinates of the points.  If x1 and y1 can
     contain multiple contours, represented either as NaN-separated
     vectors or as cell arrays, then each contour is converted to
     counter-clockwise ordering.  XCCW/YCCW has the same format of the
     input.

     See also: poly2ccw,ispolycw.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Convert Polygons to clockwise contours(polygons).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
polybool


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2628
 -- Function File: [VXO, VYO] = polybool (OP, VX1, VY1, VX2, VY2)
 -- Function File: [MXYZ] = polybool (OP, MSP, MCP)
 -- Function File: [MXYZ] = polybool (..., LIBRARY)
     Perform boolean operation(s) on polygons.

     The subject and clip polygons can each be represented by two
     separate input vectors.  The subject polygon X and Y coordinates
     would be VX1 and VY1, resp., and the clip polygon(s) X and Y
     coordinates would be VX2 and VY2.  All these vectors can be row or
     column vectors, numeric or cell, and the output format will match
     that of VX1 and VY1.

     Alternatively, the subject and clip polygons can be represented by
     2D or 3D matrices (MSP and MCP, respectively) of X, Y, and
     -optionally- Z values, where each row constitues the coordinates of
     one vertex.  The Z values of clip polygon(s) are ignored.  Z-values
     of newly created vertices in the output polygon(s) are copied from
     the nearest vertex in the subject polygon(s).

     In any case the input polygons can be multipart, where subpolygons
     are separated by NaN values (or NaN rows in case of matrix input).
     By convention, in case of nested polygons the outer polygon should
     have a clockwise winding direction, inner polygons constituting
     "holes" should have a counterclockwise winding direction; polygons
     nested in holes should again be clockwise, and so on.

     Every polygon part should comprise at least different 3 vertices.
     As polygons are implicitly assumed to be closed, no need to repeat
     the first vertex as last closing vertex.

     Likewise, output polygons returned in VXO and VYO (in case of
     vector input) or MXYZ (in case of matrix input) can be multipart
     and if so also have NaNs or NaN row(s) separating subpolygons.

     OP is the requested operation and can be one of the following (for
     character values only the first letter is required,
     case-independent):

     0 (numeric)
     "subtraction"
     "minus"
     
          Subtract the clip polygon(s) from the subject polygon(s).

     1 (numeric)
     "intersection"
     "and"
     
          Return intersection(s) of subject and clip polygon(s).

     2 (numeric)
     "exclusiveor"
     "xor"
     
          Return ExclusiveOr(s) of subject and clip polygon(s); this is
          the complement of the 'and' operation or the result of
          subtracting the output of 'and' from 'or' operations on both
          polygons.

     3 (numeric)
     "union"
     "or"
     
          Return the union of both input polygons.

     See also: ispolycw,isShapeMultiPart.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Perform boolean operation(s) on polygons.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
polygon2patch


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1015
 -- XYO = polygon2patch (XYI)
 -- [XO, YO ] = polygon2patch (XI, YI)
 -- [XO, YO, ZO ] = polygon2patch (XI, YI, ZI)
     Connect outer (filled) polygon and inner (hole) polygons using
     branch cuts such that all polygons are connected as one string of
     vertices, for subsequent plotting polygons with holes using the
     function ‘patch’.

     XYI can be a 2 or 3 dimensional array; only the X and Y coordinates
     will be optmized and Z-values will be kept with their original
     vertices.  Alternatively separate X, Y and optionally Z-vectors can
     be specified.  The outer polygon should appear as a first
     subvector, bounded by a row of NaN values, and have a
     counterclockwise winding direction.  All subsequent inner hole
     polygons should also be bounded by rows of NaN values and have
     clockwise winding directions.

     This function expects and returns column vectors or matrices where
     each row contains coordinates of a vertex.

     See also: drawPolygon, patch.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Connect outer (filled) polygon and inner (hole) polygons using branch
cuts su...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
polygon2shape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 542
 -- 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.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
Converts a polygon to a shape with edges defined by smooth polynomials.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
polyjoin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 961
 -- [XO, YO] = polyjoin (XI, YI)
 -- XYO = polyjoin (XI)
     Convert cell arrays of multipart polygon coordinates to numeric
     vectors with polygon parts separated by NaNs.

     XI and YI are cell vectors where each cell contains a numeric
     vector of X and Y coordinates, resp.  Alternatively, XI can be a
     cell array wih each cell containing Nx2 or Nx3 matrices
     constituting XY or XYZ coordinates of polygon part vertices and yi
     can be omitted.

     XO and YO are vectors of X and Y coordinates of polygon vertices
     where polygon parts are separated by NaNs.  If XI and YI either
     were row vectors or contained row vectors, XO and YO will be
     returned as row vectors, otherwise as column vectors.

     If XI contained Nx2 or Nx3 matrices, XO will be a Nx2 or Nx3 matrix
     where polygon parts are separetd by NaN rows.  YO will be empty.

     polyjoin ultimately calls function joinPolygons in the Geometry
     package.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert cell arrays of multipart polygon coordinates to numeric vectors
with ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
polysplit


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 364
 -- Function File[CELLX,CELLY]: = polysplit(VECX,VECY)
     Convert NaN separated polygon vectors to cell arrays of polygons.

     VECX/VECY is a row/column vector of points, with possibly couples
     of NaN values.

     The function separates each component separated by NaN values, and
     returns a cell array of polygons.

     See also: polyjoin,ispolycw.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Convert NaN separated polygon vectors to cell arrays of polygons.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
shape2polygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 484
 -- Function: POLYGON = shape2polygon (SHAPE)
 -- Function: POLYGON = shape2polygon (...,PROPERTY,VALUE,...)
     Transforms a 2D shape described by piecewise smooth polynomials
     into a polygon.

     SHAPE is a n-by-1 cell where each element is a pair of polynomials
     compatible with polyval.  POLYGON is a k-by-2 matrix, where each
     row represents a vertex.  The property-value pairs are passed to
     ‘curve2polyline’.

     See also: polygon2shape, curve2poyline.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79
Transforms a 2D shape described by piecewise smooth polynomials into a
polygon.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
shapeArea


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 621
 -- Function File: [A, CCW]= shapeArea (PP)
     Calculate the area of a 2D shape defined with piecewise smooth
     polynomials.

     Shape is defined with piecewise smooth polynomials.  PP is a cell
     where each elements is a 2-by-(poly_degree+1) array containing a
     pair of polynomials.

     ‘px(i,:) = pp{i}(1,:)’ and ‘py(i,:) = pp{i}(2,:)’.

     The returned area is always positive even if the shape is
     parametrized in a clockwise direction.  If the case of a clockwise
     parametrized shape ‘CCW == -1’ otherwise ‘CCW == 1’.

     See also: shapeCentroid, shape2polygon, plotShape.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
Calculate the area of a 2D shape defined with piecewise smooth
polynomials.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
shapeCentroid


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 528
 -- Function File: CM = shapeCentroid (PP)
     Centroid of a simple plane shape defined with piecewise smooth
     polynomials.

     The shape is defined with piecewise smooth polynomials.  PP is a
     cell where each elements is a 2-by-(poly_degree+1) matrix
     containing a pair of polynomials.  ‘px(i,:) = pp{i}(1,:)’ and
     ‘py(i,:) = pp{i}(2,:)’.

     The edges of the shape should not self-intersect.  This function
     does not check for the sanity of the shape.

     See also: shapearea, shape2polygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
Centroid of a simple plane shape defined with piecewise smooth
polynomials.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
simplifyPolygon_geometry


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 246
 -- Function File: SPOLY = simplifyPolygon_geometry (POLY)
     Simplify a polygon using the Ramer-Douglas-Peucker algorithm.

     POLY is a N-by-2 matrix, each row representing a vertex.

     See also: simplifyPolyline_geometry, shape2polygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Simplify a polygon using the Ramer-Douglas-Peucker algorithm.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
simplifyPolyline_geometry


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 975
 -- [PLINE2 IDX] = simplifyPolyline_geometry (PLINE)
 -- ... = simplifyPolyline_geometry (...,PROPERTY,VALUE,...)
     Simplify or subsample a polyline using the Ramer-Douglas-Peucker
     algorithm, a.k.a.  the iterative end-point fit algorithm or the
     split-and-merge algorithm.

     The PLINE as a N-by-2 matrix.  Rows correspond to the verices
     (compatible with ‘polygons2d’).  The vector IDX constains the
     indexes on vetices in PLINE that generates PLINE2, i.e.  ‘pline2 =
     pline(idx,:)’.

     *Parameters*
     ‘'Nmax'’
          Maximum number of vertices.  Default value ‘1e3’.
     ‘'Tol'’
          Tolerance for the error criteria.  Default value ‘1e-4’.
     ‘'MaxIter'’
          Maximum number of iterations.  Default value ‘10’.
     ‘'Method'’
          Not implemented.

     Run ‘demo simplifyPolyline_geometry’ to see an example.

     See also: curve2polyline, curveval, simplifyPolygon_geometry.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Simplify or subsample a polyline using the Ramer-Douglas-Peucker
algorithm, a...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
transformShape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 460
 -- Function File: NSHAPE = transformShape (SHAPE, T)
     Applies transformation to a shape defined by piecewise smooth
     polynomials.

     SHAPE is a cell where each elements is a 2-by-(poly_degree+1)
     matrix containing a pair of polynomials.

     Format of T can be one of :
           [c] , [a b] , [a b c] or [a b c]
           [f]   [d e]   [d e f]    [d e f]
                                    [0 0 1]

     See also: shape2polygon, plotShape.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
Applies transformation to a shape defined by piecewise smooth
polynomials.





