How to draw a 3D circle that is tangent to two lines

3 次查看(过去 30 天)
May I ask that, I have two 3D lines on the same plane (M-R and N-R), and I have two known point on the individual line (M and N). the angle between two lines is unknown. And now I want to draw a circle that is tangent to both of the lines (on the same plane), and touch two known points. I know the center (o) is where two perpendicular of lines in M and N intersect each other. but I do not know how to calculate perpendicular line in 3D space and in specified plane. Is there a way to do this in matlab. Really appreciated for the help. Thank you.
Or something like this pic:
  1 个评论
Chunru
Chunru 2022-6-15
The problem is not well defined. You have the coordinates of M and N in 3D space. You need one more condition to define the circle. It could be angle MRN, or the radius of the circle, or lenth of MR, or something else. Make sure your problem is well-defined before coding.

请先登录,再进行评论。

回答(1 个)

Sam Chak
Sam Chak 2022-6-15
This problem needs a little mathematics if there is no built-in function to find that. If the two tangential points at M and N are known (compute the coordinates as you wish), then it is definitely possible to find the curvature that fits the two points and at the same time the two tangent lines are perpendicular to the radial vector of the circle.
If you can find out the governing equations from Wikipedia or some Calculus textbooks and put them here, then it should be convenient to solve the problem (find the center of the circle and its radius) using MATLAB. Else, you can also try the open-source MATLAB listed on File Exchange:
For a generalized problem, you can read about Gibb's method, Laplace's method, Gauss's method, and Lambert's Problem

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by