像box2d/bullet3d这样的*连续物理模拟*的基本思想是什么?

发布于 2024-10-21 12:46:14 字数 216 浏览 6 评论 0 原文

游戏或图形行业中的传统物理模拟基本上是离散的。 但现在的引擎(例如 box2d 或bullet3d)实现了连续的物理模拟。我知道离散仿真的基本原理,但我不知道连续仿真。这对我来说很神奇,而使用魔法既困难又危险。所以我想通过理解它们将魔法变成工具。

所以我想知道: (1)这些连续物理模拟的基本思想和实现原理是什么? (2) 这个想法可以推广到其他类型的离散模拟吗?请让我明白这一点!

Traditional physics simulation in games or graphics industry was basically discrete.
But engines nowadays such as box2d or bullet3d implement continuous physics simulation. I know basic principles of discrete simulation, but I have no idea about continuous simulation. That's magical to me, and using magic is hard and dangerous. So I want to make the magic into tools by understanding them.

So I want to know:
(1) What are the basic ideas and implementation principles of these continuous physics simulations? (2) Could the idea be generalized to other kind of discrete simulation? Please let me understand this!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

芯好空 2024-10-28 12:46:14

我只知道我在本文档中读到的内容,其中肯定有比这里简单重复的更好的信息和更好的参考。

尽管如此,听起来碰撞检测是连续的。考虑一颗子弹(巧合?)。如果你用 Δt = 1/30 s 来模拟它,那么很有可能在一个时间步长它会在你前面 5m,而下一时间步长它会在你后面 5m。据我了解,连续物理引擎会将子弹视为一条射线,在我死亡时恰好与我相交。听起来这个方法直接解决了碰撞发生的时间和地点。我怀疑旋转和平移物体的代数会变得复杂,但如果你真的想探索这一点,似乎有一些博士论文被引用。

我希望这不是太明显和居高临下,但该文件看起来有相关的参考文献。祝你好运!

I know only what I've read in this document, which certainly has better information and better references than are worth simply repeating here.

Nonetheless, it sounds like the collision detection is what's continuous. Consider a bullet (coincidence?). If you simulate it with ∆t = 1/30 s, there's a pretty high probability that it'll be 5m in front of you at one timestep and 5m behind you at the next. From what I understand, a continuous physics engine would treat the bullet as a ray which intersects me precisely at the time that I die. It sounds like this method solves directly for when and where collisions will occur. I suspect the algebra for rotating and translating bodies gets complex, but if you really want to explore that, there seem to be some PhD theses referenced.

I hope that's not too obvious and condescending, but the document looks to have the relevant references. Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文