linesplit (line, ListofRelativeDistances) or linesplit (line, NumberofSegments)
Given a line defined by its start and end points, along with desired relative distances, this function lists the coordinates of points on the line precisely at the specified relative distances. The relative value of (0) corresponds to the start of the line, while the relative value of (1) corresponds to the end of the line. Thus, a relative value of (0.5) signifies the midpoint of the line.
Or,
Given a line defined by its start and end points, and a specified number of segments for division, this function divides the line into the provided number of segments and lists the starting and ending points of each new segment.
linesplit (line, ListofRelativeDistances) → List of coordinates
linesplit (line, NumberofSegments) → List of coordinates
This function is used for splitting the lines based on given relative distances or number of segments.
Example:
<br><O N="linesplitObject1" T="Project"><br> <!-- created by ParamML Examples on 8/22/2023 --><br> <P N="line" V="[[4,3],[10,12]]" /><br> <P N="SplittedLines1" V="linesplit(line,[0,0.4,0.75,1])" /><br> <P N="SplittedLines2" V="linesplit(line,2)" /><br></O><br>

As illustrated above, the line is splitted at the given relative distances in the parameter SplittedLines1 while the line is splitted in to 2 segments in the SplittedLines2.
To view this example in the library, see (https://openbrim.org/app/?incubator=1&author=ParamML_Examples_OpenBrIM+Platform&obj=objid0cpvktmhmt8670dyjde3ip )
Last updated