在3D空间中找到圆与无限圆柱的交点 [英] Finding the intersection of the Circle and Infinite Cylinder in 3D space

查看:44
本文介绍了在3D空间中找到圆与无限圆柱的交点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找到圆和无限圆柱的交点.(全部为3D)•圆由中心,其所在的平面和半径定义.•圆柱体由轴和半径定义.

Finding the intersection of the Circle and Infinite Cylinder. (all in 3D) • Circle is defined by center, plane in which it lies and radius. • Cylinder is defined by axis and radius.

我怎么得到这两个的交集?

how can i get the intersection of these two?

推荐答案

WLOG圆柱具有等式X²+Y²= 1 (如果没有,则可以通过平移,旋转和缩放来实现)

WLOG the cylinder has equation X² + Y² = 1 (if not, you can make it so by translation, rotation and scaling).

则圆的参数方程为

P = C + U cos t + V sin t

其中 C 是中心点,而 U V 在圆平面中是两个正交矢量,长度为 R .

where C is the center point and U, V two orthogonal vectors in the circle plane, of length R.

您可以用替换代码来合理化.

You can rationalize with the substitution cos t = (1 - u²) / (1 + u²), sin t = 2u / (1 + u²).

结合这些方程,

(Cx (1 + u²) + Ux (1 - u²) + Vx 2u)² + (Cy (1 + u²) + Uy (1 - u²) + Vy 2u)² = (1 + u²)²

这是四进制的.系数没有特别简化.

which is a quartic one. There is no particular simplification of the coefficients.

您可以数值求解或通过封闭形式的公式求解.最多可以有四个解决方案.

You can solve numerically or by the closed-form formulas. There can be up to four solutions.

我猜想,这严格等同于找到使圆形圆周膨胀而形成的圆环与通过使圆柱体向其轴线放气而获得的直线之间的交点.射线追踪文献对此进行了很好的说明.

I guess that this is strictly equivalent to finding the intersections between the torus formed by inflating the circle circumference and the straight line obtained by deflating the cylinder to its axis. This is well addressed in the ray-tracing literature.

您也可以将其视为2D中的圆/椭圆相交问题.

You can also sse it as a circle/ellipse intersection problem in 2D.

这篇关于在3D空间中找到圆与无限圆柱的交点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆