This file is indexed.

/usr/share/octave/packages/geometry-1.7.0/polygons2d/doc-cache is in octave-geometry 1.7.0-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
# Created by Octave 3.8.0, Tue Feb 25 00:00:54 2014 UTC <root@aatxe>
# name: cache
# type: cell
# rows: 3
# columns: 24
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
curvature


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1035
 -- Function File: KAPPA = curvature (T, PX, PY,METHOD,DEGREE)
 -- Function File: KAPPA = curvature (T, POLY,METHOD,DEGREE)
 -- Function File: KAPPA = curvature (PX, PY,METHOD,DEGREE)
 -- Function File: KAPPA = curvature (POINTS,METHOD,DEGREE)
 -- Function File: [KAPPA POLY T] = curvature (...)
     Estimate curvature of a polyline defined by points.

     First compute an approximation of the curve given by PX and PY,
     with the parametrization T.  Then compute the curvature of
     approximated curve for each point.  METHOD used for approximation
     can be only: 'polynom', with specified degree.  Further methods
     will be provided in a future version.  T, PX, and PY are N-by-1
     array of the same length.  The points can be specified as a single
     N-by-2 array.

     If the argument T is not given, the parametrization is estimated
     using function 'parametrize'.

     If requested, POLY contains the approximating polygon evlauted at
     the parametrization T.

     See also: parametrize, polygons2d.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Estimate curvature of a polyline defined by points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 228
 -- Function File: DIST = distancePointPolygon (POINT,POLY)
     Compute shortest distance between a point and a polygon

     See also: polygons2d, points2d, distancePointPolyline,
     distancePointEdge, projPointOnPolyline.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Compute shortest distance between a point and a polygon



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
distancePointPolyline


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 449
 -- Function File: DIST = distancePointPolyline (POINT,POLY)
     Compute shortest distance between a point and a polyline Example:
                pt1 = [30 20];
                pt2 = [30 5];
                poly = [10 10;50 10;50 50;10 50];
                distancePointPolyline([pt1;pt2], poly)
                ans =
                    10
                     5

     See also: polygons2d, points2d,distancePointEdge,
     projPointOnPolyline.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute shortest distance between a point and a polyline Example:
           pt1



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
distancePolygons


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 112
 -- Function File: DIST = distancePolygons (POLY1,POLY2)
     Compute the shortest distance between 2 polygons




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Compute the shortest distance between 2 polygons



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 577
 -- Function File: H = drawPolygon (COORD)
 -- Function File: H = drawPolygon (PX, PY)
 -- Function File: H = drawPolygon (POLYS)
     Draw a polygon specified by a list of points.

     drawPolygon(COORD); Packs coordinates in a single [N*2] array.

     drawPolygon(PX, PY); Specifies coordinates in separate arrays.

     drawPolygon(POLYS) Packs coordinate of several polygons in a cell
     array.  Each element of the array is a Ni*2 double array.

     H = drawPolygon(...); Also return a handle to the list of line
     objects.

     See also: polygons2d, drawCurve.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Draw a polygon specified by a list of points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1073
 -- Function File: = drawPolyline (, )
     DRAWPOLYLINE Draw a polyline specified by a list of points

     drawPolyline(COORD); packs coordinates in a single [N*2] array.

     drawPolyline(PX, PY); specifies coordinates in separate arrays.  PX
     and PY must be column vectors with the same length.

     drawPolyline(..., TYPE); where TYPE is either 'closed' or 'open',
     specifies if last point must be connected to the first one
     ('closed') or not ('open').  Default is 'open'.

     drawPolyline(..., PARAM, VALUE); specify plot options as described
     for plot command.

     H = drawPolyline(...)  also return a handle to the list of line
     objects.

     Example:
            # Draw a curve representing an ellipse
            t = linspace(0, 2*pi, 100)';
            px = 10*cos(t); py = 5*sin(t);
            drawPolyline([px py], 'closed');
            axis equal;

            # The same, with different drawing options
            drawPolyline([px py], 'closed', 'lineWidth', 2, 'lineStyle', '--');
  

     See also: polygons2d, drawPolygon.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
DRAWPOLYLINE Draw a polyline specified by a list of points



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 913
 -- Function File: LOOPS = expandPolygon (POLY, DIST)
     Expand a polygon by a given (signed) distance

     Associates to each edge of the polygon POLY the parallel line
     located at distance DIST from the current edge, and compute
     intersections with neighbor parallel lines.  The resulting polygon
     is simplified to remove inner "loops", and can be disconnected.
     The result is a cell array, each cell containing a simple linear
     ring.

     This is a kind of dilation, but behaviour on corners is different.
     This function keeps angles of polygons, but there is no direct
     relation between length of 2 polygons.

     It is also possible to specify negative distance, and get all
     points inside the polygon.  If the polygon is convex, the result
     equals morphological erosion of polygon by a ball with radius equal
     to the given distance.

     See also: polygons2d.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Expand a polygon by a given (signed) distance



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
medialAxisConvex


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 857
 -- Function File: [N E] = medialAxisConvex (POLYGON)
     Compute medial axis of a convex polygon

     POLYGON is given as a set of points [x1 y1;x2 y2 ...], returns the
     medial axis of the polygon as a graph.  N is a set of nodes.  The
     first elements of N are the vertices of the original polygon.  E is
     a set of edges, containing indices of source and target nodes.
     Edges are sorted according to order of creation.  Index of first
     vertex is lower than index of last vertex, i.e.  edges always point
     to newly created nodes.

     Notes: - Is not fully implemented, need more development (usually
     crashes for polygons with more than 6-7 points...)  - Works only
     for convex polygons.  - Complexity is not optimal: this algorithm
     is O(n*log n), but linear algorithms exist.

     See also: polygons2d, bisector.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Compute medial axis of a convex polygon



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1235
 -- Function File: PAR = parametrize (POLY)
 -- Function File: PAR = parametrize (PX,PY)
 -- Function File: PAR = parametrize (...,NORMALIZE)

     Parametrization of a curve, based on edges length

     Returns a parametrization of the curve defined by the serie of
     points, based on euclidean distance between two consecutive points.
     POLY is a N-by-2 array, representing coordinates of vertices.  The
     result PAR is N-by-1, and contains the cumulative length of edges
     until corresponding vertex.  The function also accepts the polygon
     as two inputs PX and PY representinx coordinates x and y
     respectively.  When optional argument NORMALIZE is non-empty PAR is
     rescaled such that the last element equals 1, i.e.  'PAR(end)==1'.

     Example
              # Parametrize a circle approximation
              poly = circleToPolygon([0 0 1], 200);
              p = parametrize(poly);
              p(end)
              ans =
                  6.2829
              p = parametrize(poly,'norm');
              p(end)
              ans =
                  1
              p = parametrize(poly,true);
              p(end)
              ans =
                  1

     See also: polygons2d, polylineLength.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Parametrization of a curve, based on edges length



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 544
 -- 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: 11
polygonArea


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 882
 -- Function File: AREA = polygonArea (POINTS)
 -- Function File: AREA = polygonArea (PX,PY)
     Compute the signed area of a polygon.

     Compute area of a polygon defined by POINTS.  POINTS is a N-by-2
     matrix containing coordinates of vertices.

     Vertices of the polygon are supposed to be oriented
     Counter-Clockwise (CCW). In this case, the signed area is positive.
     If vertices are oriented Clockwise (CW), the signed area is
     negative.

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

     If POINTS is a cell, each element is considered a polygon and the
     area of each one is returned in the matrix AREA.  The matrix has
     the same shape as the cell.

     References: Algorithm adapted from P. Bourke web page
     http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/

     See also: polygons2d, polygonCentroid, drawPolygon.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Compute the signed area of a polygon.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 584
 -- Function File: [ PT, AREA ] = polygonCentroid (POINTS)
 -- Function File: [ ... ]= polygonCentroid (PTX,PTY)
     Compute the centroid (center of mass) of a polygon.

     Computes the center of mass of a polygon defined by POINTS.  POINTS
     is a N-by-2 matrix.  The two columns can be given separately using
     PTX and PTY for the x and y component respectively.

     The area of the polygon is returned in the second output argument.

     Adapted from
     <http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/>

     See also: polygons2d, polygonArea, drawPolygon.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Compute the centroid (center of mass) of a polygon.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 642
 -- Function File: LOOPS = polygonLoops (POLY)
     Divide a possibly self-intersecting polygon into a set of simple
     loops

     POLY is a polygone defined by a series of vertices, LOOPS is a cell
     array of polygons, containing the same vertices of the original
     polygon, but no loop self-intersect, and no couple of loops
     intersect each other.

     Example:
                poly = [0 0;0 10;20 10;20 20;10 20;10 0];
                loops = polygonLoops(poly);
                figure(1); hold on;
                drawPolygon(loops);
                polygonArea(loops)

     See also: polygons2d, polygonSelfIntersections.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Divide a possibly self-intersecting polygon into a set of simple loops



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 132
 -- Function File: POINT = polygonPoint (POLY, POS)
     Extract a point from a polygon

     See also: polygons2d, polylinePoint.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Extract a point from a polygon



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 669
 -- Function File: PTS = polygonSelfIntersections (POLY)
 -- Function File: [PTS POS1 POS2] = polygonSelfIntersections (POLY)
     Find-self intersection points of a polygon

     Return the position of self intersection points

     Also return the 2 positions of each intersection point (the
     position when meeting point for first time, then position when
     meeting point for the second time).

     Example
                # use a '8'-shaped polygon
                poly = [10 0;0 0;0 10;20 10;20 20;10 20];
                polygonSelfIntersections(poly)
                ans =
                    10 10

     See also: polygons2d, polylineSelfIntersections.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Find-self intersection points of a polygon



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 512
 -- Function File: POLY2 = polygonSubcurve (POLYGON, POS0,POS1)
     Extract a portion of a polygon

     Create a new polyline, by keeping vertices located between
     positions POS0 and POS1, and adding points corresponding to
     positions POS0 and POS1 if they are not already vertices.

     Example:
          Nv    = 100;
          poly  = circleAsPolygon ([10 20 30], Nv);
          poly2 = polygonSubcurve (poly, 15, 65);
          drawPolyline (poly2);

     See also: polygons2d, polylineSubcurve.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Extract a portion of a polygon



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6874
 -- Function File: polygons2d ()
     Description of functions operating on 2D polygons

     The 'polygons' module contains functions operating on shapes
     composed of a vertex list, like polygons or polylines.

     We call 'polyline' the curve defined by a series of vertices.  A
     polyline can be either closed or open, depending on whether the
     last vertex is connected to the first one or not.  This can be
     given as an option is some functions in the module.  A 'polygon' is
     the planar domain delimited by a closed polyline.  We sometimes
     want to consider 'complex polygons', whose boundary is composed of
     several disjoint domains.  The domain defined by a single closed
     polyline is called 'simple polygon'.  We call 'curve' a polyline
     with many vertices, such that the polyline can be considered as a
     discrete approximation of a "real" curve.

     A simple polygon or polyline is represented by a N-by-2 array, each
     row of the array representing the coordinates of a vertex.  Simple
     polygons are assumed to be closed, so there is no need to repeat
     the first vertex at the end.  As both polygons and polylines can be
     represented by a list of vertex coordinates, some functions also
     consider the vertex list itself.  Such functions are prefixed by
     'pointSet'.  Also, many functions prefixed by 'polygon' or
     'polyline' works also on the other type of shape.

     For multiple-connected polygons, the different connected boundaries
     are separated by a row [NaN NaN].

     For some functions, the orientation of the polygon can be relevant:
     CCW stands for 'Conter-Clockwise' (positive orientation), CW stands
     for 'Clockwise'.

     Polylines are parametrized in the following way: * the i-th vertex
     is located at position i-1 * points of the i-th edge have positions
     ranging linearly from i-1 to i The parametrization domain for an
     open polyline is from 0 to Nv-1, and from 0 to Nv for a closed
     polyline (positions 0 and Nv correspond to the same point).

     Example: # Simple polygon: P1 = [1 1;2 1;2 2;1 2]; drawPolygon(P1);
     axis([0 5 0 5]); # Multiple polygon: P2 = [10 10;40 10;40 40;10
     40;NaN NaN;20 20;20 30;30 30;30 20]; figure;drawPolygon(P2);
     axis([0 50 0 50]);

     Point Sets pointSetBounds - Bounding box of a set of points
     pointSetsAverage - Compute the average of several point sets
     minimumCaliperDiameter - Minimum caliper diameter of a set of
     points findPoint - Find index of a point in an set from its
     coordinates

     Polylines polylinePoint - Extract a point from a polyline
     polylineLength - Return length of a polyline given as a list of
     points polylineCentroid - Compute centroid of a curve defined by a
     series of points polylineSubcurve - Extract a portion of a polyline
     reversePolyline - Reverse a polyline, by iterating vertices from
     the end isPointOnPolyline - Test if a point belongs to a polyline
     projPointOnPolyline - Compute position of a point projected on a
     polyline distancePointPolyline - Compute shortest distance between
     a point and a polyline distancePolylines - Compute the shortest
     distance between 2 polylines intersectPolylines - Find the common
     points between 2 polylines polylineSelfIntersections - Find
     self-intersections points of a polyline

     Curves (polylines with lot of vertices) parametrize -
     Parametrization of a curve, based on edges length curvature -
     Estimate curvature of a polyline defined by points cart2geod -
     Convert cartesian coordinates to geodesic coord.  geod2cart -
     Convert geodesic coordinates to cartesian coord.  curveMoment -
     Compute inertia moment of a 2D curve curveCMoment - Compute
     centered inertia moment of a 2D curve curveCSMoment - Compute
     centered scaled moment of a 2D curve

     Polygons polygonPoint - Extract a point from a polygon
     polygonSubcurve - Extract a portion of a polygon reversePolygon -
     Reverse a polygon, by iterating vertices from the end
     projPointOnPolygon - Compute position of a point projected on a
     polygon splitPolygons - Convert a NaN separated polygon list to a
     cell array of polygons clipPolygon - Clip a polygon with a
     rectangular box clipPolygonHP - Clip a polygon with a Half-plane
     defined by a directed line intersectLinePolygon - Intersection
     points between a line and a polygon intersectRayPolygon -
     Intersection points between a ray and a polygon
     polygonSelfIntersections - Find-self intersection points of a
     polygon convexHull - Convex hull of a set of points polygonLoops -
     Divide a possibly self-intersecting polygon into a set of simple
     loops expandPolygon - Expand a polygon by a given (signed) distance
     medialAxisConvex - Compute medial axis of a convex polygon

     Measures on Polygons isPointInPolygon - Test if a point is located
     inside a polygon polygonContains - Test if a point is contained in
     a multiply connected polygon polygonCentroid - Compute the centroid
     (center of mass) of a polygon polygonArea - Compute the signed area
     of a polygon polygonLength - Perimeter of a polygon
     polygonNormalAngle - Compute the normal angle at a vertex of the
     polygon polygonBounds - Compute the bounding box of a polygon
     distancePointPolygon - Compute shortest distance between a point
     and a polygon distancePolygons - Compute the shortest distance
     between 2 polygons

     Triangles isPointInTriangle - Test if a point is located inside a
     triangle triangleArea - Area of a triangle

     Functions from stochastic geometry steinerPoint - Compute steiner
     point (weighted centroid) of a polygon steinerPolygon - Create a
     Steiner polygon from a set of vectors supportFunction - Compute
     support function of a polygon convexification - Compute the
     convexification of a polygon

     Input, Output and conversions readPolygon - Read a polygon stored
     in a file polygonToRow - Convert polygon coordinates to a row
     vector rowToPolygon - Create a polygon from a row vector
     rectAsPolygon - Convert a (centered) rectangle into a series of
     points

     Drawing functions drawPolyline - Draw a polyline specified by a
     list of points drawPolygon - Draw a polygon specified by a list of
     points fillPolygon - Fill a polygon specified by a list of points

     Credits: * function intersectPolylines uses the 'interX'
     contribution from "NS" (file exchange 22441, called
     'curve-intersections')

     --- Author: David Legland e-mail: david.legland@grignon.inra.fr
     created the 07/11/2005.  Homepage:
     <http://matgeom.sourceforge.net/>
     <http://www.pfl-cepia.inra.fr/index.php?page=geom2d> Copyright INRA
     - Cepia Software Platform.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Description of functions operating on 2D polygons



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 825
 -- Function File: PTS = polylineSelfIntersections (POLY)
     Find self-intersections points of a polyline

     Return the position of self intersection points

     Also return the 2 positions of each intersection point (the
     position when meeting point for first time, then position when
     meeting point for the second time).

     Example
                # use a gamma-shaped polyline
                poly = [0 0;0 10;20 10;20 20;10 20;10 0];
                polylineSelfIntersections(poly)
                ans =
                    10 10

                # use a 'S'-shaped polyline
                poly = [10 0;0 0;0 10;20 10;20 20;10 20];
                polylineSelfIntersections(poly)
                ans =
                    10 10

     See also: polygons2d, intersectPolylines, polygonSelfIntersections.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Find self-intersections points of a polyline



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 296
 -- Function File: POLY2 = reversePolygon (POLY)
     Reverse a polygon, by iterating vertices from the end

     POLY2 = reversePolygon(POLY) POLY2 has same vertices as POLY, but
     in different order.  The first vertex of the polygon is still the
     same.

     See also: reversePolyline.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Reverse a polygon, by iterating vertices from the end



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 264
 -- Function File: POLY2 = reversePolyline (POLY)
     Reverse a polyline, by iterating vertices from the end

     POLY2 = reversePolyline(POLY) POLY2 has same vertices as POLY, but
     POLY2(i,:) is the same as POLY(END-i+1,:).

     See also: reversePolygon.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Reverse a polyline, by iterating vertices from the end



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 230
 -- Function File: SPOLY = simplifypolygon (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, 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: 16
simplifypolyline


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 914
 -- Function File: [PLINE2 IDX] = simplifypolyline (PLINE)
 -- Function File: ... = simplifypolyline (...,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' to see an example.

     See also: curve2polyline, curveval.




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 347
 -- Function File: POLYGONS = splitPolygons (POLYGON)
     Convert a NaN separated polygon list to a cell array of polygons.

     POLYGON is a N-by-2 array of points, with possibly couples of NaN
     values.  The functions separates each component separated by NaN
     values, and returns a cell array of polygons.

     See also: polygons2d.




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 511
 -- Function File: H = suppportFunction (POLYGON)
 -- Function File: H = suppportFunction (POLYGON, N)
 -- Function File: H = suppportFunction (POLYGON, V)
     Compute support function of a polygon

     H = supportFunction(POLYGON, N) uses N points for suport function
     approximation

     H = supportFunction(POLYGON) assume 24 points for approximation

     H = supportFunction(POLYGON, V) where V is a vector, uses vector V
     of angles to compute support function.

     See also: convexification.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Compute support function of a polygon