The thought is to generate a path with a sure distance d
.
At present the era pseudo code is as follows:
traces: Checklist of line
traces[0]: line beginning at (x:0, y:0) and ending at (x:0, y:1)
for i: 1 to m:
random_angle: randomly generate angle between -90 and 90 degress.
traces[i]: new line beginning on the finish of traces[i-1] forming and angle = random_angle
between traces[i-1] and and features[i]
The final concept is illustrated within the under:
However the issue is that when m
is sufficiently big the traces create a loop and find yourself intersecting one another.
Any resolution to this ?
1- Been looking for a very good math library that detects the intersection between 2 traces,
then test for every new line if it intersects the others already created, however no library was discovered
2- Any one other algorithm that may generate a random line path ?