- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Greetings to all forum members!
I need to determine the coordinates of a point lying relative to the polyline at some distance. To do this, needed certain geometric calculations, which I tried to represent in picture attached to this post. In the picture, each stage of geometric calculations numbered separately. Below I will provide an explanation for each of the steps.
1. For the first stage of calculations, a polyline with the following characteristics is required:
• not closed
• contains more than one segment (the number of segments can be any)
• the first and last segment are not arcs
As the initial data for further calculations, only four coordinates are required: two coordinates of the vertices of the first segment and two coordinates of the vertices of the last segment of the polyline.
2. At this stage, an imaginary XLINE_1 is created, which passes through the start point of the polyline and is perpendicular to the first segment. After that, the condition is checked: if the imaginary XLINE_1 does not intersection the last segment of the polyline, then go to stage 3, if it crosses the last segment, then go to stage 5.
3. Then need to create imaginary XLINE_2 that passes through the endpoint of the polyline and is perpendicular to XLINE_1.
4. Now, at the intersection of XLINE_1 and XLINE_2, the coordinates of the required point will be obtained.
5. At this stage, a condition is presented when the imaginary XLINE_1 intersect the last segment of the polyline, then go to the next stage.
6. In this case, the imaginary XLINE_1 must passing through the end point of the polyline and be perpendicular to the last segment, and the imaginary XLINE_2 must passing through the start point of the polyline and be perpendicular to XLINE_1. At the intersection of XLINE_1 and XLINE_2, the coordinates of the required point will be obtained.
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Thus, the solution to this problem will be to obtain the coordinates of the required point, which will differ depending on the condition - whether or not XLINE_1 intersects the last segment of the polyline.
I hope I have not explained my thoughts too chaotically. I would be very grateful for your help in solving this problem.
Thanks in advance.
Solved! Go to Solution.