Ramer-Douglas-Peucker line simplification: Difference between revisions

m
→‎{{header|REXX}}: corrected spelling of the name: Peucker.
m (→‎{{header|REXX}}: elided the use of a separate assignment for dressing up the output (points) with parenthesis.)
m (→‎{{header|REXX}}: corrected spelling of the name: Peucker.)
Line 787:
=={{header|REXX}}==
The computation for the   ''perpendicular distance''   was taken from the   '''GO'''   example.
<lang rexx>/*REXX program uses the Ramer─Douglas─Peuker Ramer─Douglas─Peucker (RDP) line simplification algorithm for*/
/*───────────────────────────── reducing the number of points used to define its shape. */
parse arg epsilon pts /*obtain optional arguments from the CL*/
Line 795:
say ' error threshold: ' epsilon /*echo the error threshold to the term.*/
say ' points specified: ' pts /* " " shape points " " " */
$= RDP(pts) /*invoke theRamer─Douglas─Peucker Ramer─Douglas─Peuker func.function*/
say 'points simplified: ' rez($) /*display points with () ───► terminal.*/
exit /*stick a fork in it, we're all done. */