两点碰撞法线 [英] Collision Normal of two points

查看:201
本文介绍了两点碰撞法线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试计算两点的碰撞法线。对于碰撞响应方程式,我需要它来计算新的角速度和线速度。

I'm trying to calculate the collision normal of two points. I need this for the collision response equations to calculate the new angular and linear velocities.

例如,当两个2d或3d框的角相互碰撞时,就会发生这种情况。他们的碰撞法线是什么?

This scenario happens when, for example, the corners of two 2d or 3d boxes collide with each other. What would be their collision normal?

现在,在顶点和面碰撞的情况下,碰撞法线将只是面的法线。

I now that in the case of a vertex and face collision the collision normal would be just the normal of the face.

推荐答案

它是未定义的。从技术上讲,碰撞法线应该是其配置空间障碍物(即两个对象相交的所有变换的集合)表面的法线。这是一个交互式演示,可能会有所帮助:

It is undefined. Technically, the collision normal should be the normal at the surface of the their configuration space obstacle (ie the set of all transformations where the two objects intersect). Here is an interactive demo which may help:

http://www.pfirth.co.uk/minkowski.html

因此,如果对象不光滑,则定义明确法线在其边界上的不可微点将不存在。相反,您会得到可能的法线锥。

As a result, if the objects are not smooth, then a well defined normal will not exist at the points of non-differentiability on their boundary. Instead you get a cone of possible normals.

          ^
          |
          |  normal cone
          |
----------+---->
~~~~~~~~~~|
~obstacle~|
~~~~~~~~~~| 

因此,您可以使该圆锥体中的任何法线成为用来分离两个对象的那个,例如:

Thus, you could take any normal in that cone to be the one you use to separate the two objects, for example:

          ^   ^
          |  /
          | /  possible normal
          |/
----------+---->
~~~~~~~~~~|
~obstacle~|
~~~~~~~~~~| 

现在,最少行动原则指出,此处议案的正确解决方案应是最小的工作,这里的极值只是圆锥体的壁。这意味着在没有任何其他交互作用的情况下,我们可以假设脉冲力是朝向其中一个面的方向。要确定是哪一个,动作原则又说您应该选择效果最差的法线。要弄清楚这一点,您只需计算两个面的碰撞响应,然后选择脉冲力最小的面即可。

Now the principle of least action states that the correct solution to the motion here should be the normal which does minimal work, and the extrema here are just the walls of the cone. This means that in the absence of any other interactions, we could just assume that the impulse force is in the direction of one of the faces. To decide which one, again the action principle says that you should pick the normal which does least work. To figure this out, you just compute the collision response for both faces, then select the face whose impulse force has the least magnitude.

这篇关于两点碰撞法线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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