How to draw a 3D circle that is tangent to two lines
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Chunru
el 15 de Jun. de 2022
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.
Respuestas (1)
Sam Chak
el 15 de Jun. de 2022
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
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!