static L onePathToPolarIntervals_v1(OnePath path, int nIntervals) { if (path == null) null; L out = emptyList(nIntervals); int iPath = 0, lPath = path.size(); double step = lPath/nIntervals; var it = path.pointIterator(); Pt p = it.next(), lastPoint = p; for i to nIntervals: { int iPath2 = iround((i+1)*step); while (iPath < iPath2) { p = it.next(); iPath++; } out.add(PolarPt(p.minus(lastPoint))); lastPoint = p; } ret out; }