Answer the question
In order to leave comments, you need to log in
How to build a "road", having an array of points?
The yellow line is a line built by sequentially connecting points from an array.
You need to end up with something like this:
Can you tell me the algorithm for obtaining points of the edges of the road?
Answer the question
In order to leave comments, you need to log in
Linear algebra, school? Equation of a straight line through two given points (road segment). Its offset along the perpendicular in both directions by the width of the road = shoulders of this segment.
Intersections resp. straight lines with shoulders of adjacent segments = shoulder corners.
A special case is very sharp corners (imagine an angle of about 1˚) - shoulders can go to infinity to cross. It is necessary to limit the distance of the point of intersection of the outer shoulders from the point of the corner of the center line. See the term "miter limit".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question