Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a name for "Breaking up a line at regular intervals"?

I have a line in the form of an array of coordinate points:

[{x1,y1}, [x2,y2], ect...]

The points which make up the line are at varying distances from one another.

My goal is to make a function which takes this line and split it up into evenly separated distances.

All I'm looking for is the terminology for this process... Interpolation? because I want to search for it and not reinvent the wheel.

like image 830
Carson the Powers Avatar asked Nov 12 '22 17:11

Carson the Powers


1 Answers

I would call that segmentation.

First you determine the linear function that defines the line itself; at least two points are required for that.

Afterwards, you need: 1. The above linear function 2. Two values of x that will define the leftmost and rightmost point 3. The segment length, so that the hypothenuse between the endpoints is a multiple of it.

Finally you create a function that takes the above three pieces of data and returns a list of points, evenly separated by given segment length.

like image 164
Ja͢ck Avatar answered Nov 15 '22 13:11

Ja͢ck