关于2D多边形碰撞响应的一些问题
嘿,读完这篇文章后,我留下了一些问题,我希望在这里解决。
我的理解是,任何多维碰撞响应的目标都是将其转换为一维碰撞,将物体放在某种共享轴上。我从文章中推断出,响应 2 个多边形之间的 2d 碰撞的步骤是
- 首先找到每个物体碰撞点的速度矢量,
- 然后根据每个碰撞点的速度查找相对速度(参见问题 1)
- 考虑沿着“力传递线(参见问题 2)”的速度有多少
(这是对碰撞唯一重要的速度) - 系数
- 弹性系数 质量
- 根据 2-4 求出冲量/新线速度
- 最后,通过计算出有多少冲量“围绕”每个物体“旋转”,计算出新的角速度CM(决定角加速度的因素)
所有这些步骤基本上计算出每个速度转换到新的一维坐标系后每个点以多少速度到达另一个点,对吧?
问题1:文章说相对速度是为了找到并表达碰撞点相互接近的速度,但对我来说,它似乎只是
的向量 CM 1 -> CM 2,其大小基于每个点的速度。我不明白甚至在计算中包括 CM 背后的原因,因为碰撞的是点,而不是 CM。另外,我喜欢将事物可视化,那么相对速度如何进行几何转换,以及它如何实现一维碰撞问题的目标。
问题2:文章指出,碰撞时唯一的力是垂直于撞击边缘的方向,但这是如何决定的呢?另外,当每个物体最终都会以两种不同的方向弹起<时,它们怎么可能只能朝一个方向受力< /strong> 方向。
Hey so after reading this article I've been left with a few questions I hope to resolve here.
My understanding is that the goal of any multi-dimensional collision response is to convert it to a 1D collision be putting the bodies on some kind of shared axis. I've deduced from the article that the steps to responding to a 2d collision between 2 polygons is to
- First find the velocity vector of each bodies collision point
- Find relative velocity based on each collision point's velocity (see question 1)
- Factor in how much of that velocity is along the the "force transfer line (see question 2)"
(which is the only velocity that matters for the collision) - Factor in elasticity
- Factor in mass
- Find impulse/ new linear velocity based on 2-4
- Finally figure out new angular velocity by figuring out how much of the impulse is "rotating around" each object's CM (which is what determines angular acceleration)
All these steps basically figure out how much velocity each point is coming at the other with after each velocity is translated to a new 1D coordinate system, right?
Question 1: The article says relative velocity is meant to find and expression for the velocity with which the colliding points are approaching each other, but to me it seems as though is simply the vector of
CM 1 -> CM 2, with magnitude based on each point's velocity. I don't understand the reasoning behind even including the CMs in the calculations since it is the points colliding, not the CMs. Also, I like visualizing things, so how does relative velocity translate geometrically, and how does it work toward the goal of getting a 1D collision problem.
Question 2: The article states that the only force during the collision is in the direction perpendicular to the impacted edge, but how was this decided? Also how can they're only be force in one direction when each body is supposed to end up bouncing off in 2 different directions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“所有这些步骤基本上都可以计算出每个速度转换到新的一维坐标系后每个点以多少速度到达另一个点,对吗?”
这似乎是对步骤 1 的很好的描述和 2.
“问题 1:文章说相对速度是为了找到并表达碰撞点相互接近的速度,但对我来说,它似乎只是 CM 1 的向量 -> CM 2,大小基于每个点的速度。”
不,想象一下两个 CM 几乎静止,但一个矩形旋转并撞击另一个。碰撞点的相对速度几乎垂直于 CM1 和 CM2 之间的位移矢量。
“...相对速度如何进行几何转换?”
放大碰撞前的碰撞地点。如果您站在一个物体的碰撞点上,您会看到另一点上的碰撞点以一定的速度接近您(在您的框架中,即您静止不动的框架中)。
“......它如何实现获得一维碰撞问题的目标?”
在碰撞位置,它是一个一维碰撞问题。
“问题 2:文章指出,碰撞过程中唯一的力是垂直于受影响边缘的方向,但这是如何决定的?”
看起来像是为了使表面变得光滑而任意决定的,为了让问题更容易解决。
“而且,当每个物体最终都会向 2 个不同方向弹跳时,[那里]怎么可能只有一个方向的力。”
每个物体都会受到一个方向的力。它沿某一方向出发,以一定的角速度旋转。我无法解析问题的其余部分。
"All these steps basically figure out how much velocity each point is coming at the other with after each velocity is translated to a new 1D coordinate system, right?"
That seems like a pretty good description of steps 1 and 2.
"Question 1: The article says relative velocity is meant to find and expression for the velocity with which the colliding points are approaching each other, but to me it seems as though is simply the vector of CM 1 -> CM 2, with magnitude based on each point's velocity."
No, imagine both CMs almost stationary, but one rectangle rotating and striking the other. The relative velocity of the colliding points will be almost perpendicular to the displacement vector between CM1 and CM2.
"...How does relative velocity translate geometrically?"
Zoom in on the site of collision, just before impact. If you are standing on the collision point of one body, you see the collision point on the other point approaching you with a certain velocity (in your frame, the one in which you are standing still).
"...And how does it work toward the goal of getting a 1D collision problem?"
At the site of collision, it is a 1D collision problem.
"Question 2: The article states that the only force during the collision is in the direction perpendicular to the impacted edge, but how was this decided?"
It looks like an arbitrary decision to make the surfaces slippery, in order to make the problem easier to solve.
"Also how can [there] only be force in one direction when each body is supposed to end up bouncing off in 2 different directions."
Each body experiences a force in one direction. It departs in a certain direction, rotating with a certain angular velocity. I can't parse the rest of the question.