Insert an arc with a specific radius at point of intersection of 2 lines
1 view (last 30 days)
Show older comments
Hi, I have a path which is represented by 2 straight lines connected together with a sharp turn. I want to replace this turn by inserting an arc. Currently I am trying to fit a circle with a fixed radius at the point of intersection as shown in the image :
From this I will then find the points where the circle intersects the 2 lines such that the new path can be obtained. However, I am having some trouble to calculate the centre point of the circle. Currently I am considering the test case when the first line is a straight line and the second line makes an angle greater than 90 with the first line are. To obtain the required results the following center point equation are used:
theta_dif = theta - 90;
center_x = x2 - r+r*sind(theta_dif);
center_y = y2 - r;
where r is the radius , theta is the angle between the 2 lines
These equations only hold when the first line has a constant gradient of 0. I need to come up with a generic solution that holds for all angles and line orientation.
Please help. Can I implement it in a different method?
Thanks
0 Comments
Answers (0)
See Also
Categories
Find more on Smoothing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!