Convert points from global coordinates into a local coordinate frame.
target points
local frame origin
points in local frame
Subtracting a local origin is useful before precision-sensitive geometry operations (for example cross products used in centroid/area calculations).
const world = [[1000, 2000], [1005, 2003]];geomToLocal(world, [1000, 2000]); // returns [[0, 0], [5, 3]] Copy
const world = [[1000, 2000], [1005, 2003]];geomToLocal(world, [1000, 2000]); // returns [[0, 0], [5, 3]]
Convert points from global coordinates into a local coordinate frame.