SortArray3ByDistance Op
sort an array3, by the distance of each point to the previous point
Summary (oneliner)
Sorts an array with the following rules:
- Get the 1st point position
- Go through the entire array and calculate the distance of every point to the 1st
- Get the index which has the smallest distance
- this index now becomes the new previous point
- remove the previous position from sorting algorithm
repeats until the entire array has been sorted.
Full Name
- Ops.Array.PointArray.SortArray3ByDistance
- Core Op - Official cables op
- MIT
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
Example Patch SortArray3ByDistance example
INPUT PORTS
Array (Array)
Array in
OUTPUT PORTS
Result (Array)
Sorted array out
Result Index (Array)