Ramer–Douglas–Peucker algorithm: Difference between revisions

Content deleted Content added
Application: MOS:REFPUNCT
Tag: Reverted
Line 26:
dmax = 0
index = 0
end = length(PointList)P
'''for''' i = 2 to (end - 1) {
d = perpendicularDistance(PointList[i], Line(PointList[1], PointList[end]))
'''if''' (d > dmax) {
index = i
dmax = d
}
}
ResultList[] = empty;
// If max distance is greater than epsilon, recursively simplify
'''if''' (dmax > epsilon) {