@simplify_lang_v(nim, tol:numeric, n:numeric)
build a new simpler nim by aggregating breakpoints using a Lang polyline simplification algorithm with tolerance tol and sequence size n.

In the simplification process, a breakpoint is assimilated to a d dimensional point for a nim with dimension d (in other words, the x part of the breakpoint is not taken into account). This is the case for all nim simplification functions that end with a _t.

The Lang simplification algorithm examines a sequence of such points of a fixed length n (i.e., n successive breakpoints). The first and last points of that sequence specify a segment. This segment is used to calculate the perpendicular distance to each intermediate breakpoints. If any calculated distance is larger than the specified tolerance, the search region will be shrunk by excluding its last point. This process will continue until all calculated distances fall below the specified tolerance, or when there are no more intermediate breakpoints. All intermediate brakpoints are removed and a new search sequence is defined starting at the last point from old search region. This process is illustrated below.

the Lang polyline simplification algorithm on a nim

See also @align_breakpoints, @sample and the nim simplification functions: @simplify_radial_distance_t, @simplify_radial_distance_v, @simplify_lang_v, @filter_median_t, @filter_min_t, @filter_max_t, @window_filter_t

See also Nim Related Functions @aggregate    @align_breakpoints    [@clone]    [@compose]    @concat_nim    @dim    @filter_max_t    @filter_median_t    @filter_min_t    @integrate    @linearize    @max_key    @max_val    @min    @min_key    @min_val    @projection    @push_back    @push_front    @sample    [@scale_x]    [@scale_y]    @simplify_lang_v    @simplify_radial_distance_t    @simplify_radial_distance_v    @window_filter_t