百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

Ten-Minute-Physics-Unity

> DevOps
开源

在 Unity 中实现 Ten Minute Physics YouTube 频道的实现。与使用 Unity 内置的物理引擎相比,您将学习如何制作自己的 XPBD 物理引擎。

356 stars0 点赞7 次浏览
访问官网GitHub

工具介绍

在 Unity 中实现 Ten Minute Physics YouTube 频道的实现。与使用 Unity 内置的物理引擎相比,您将学习如何制作自己的 XPBD 物理引擎。

Ten Minute Physics in Unity

Implementations in Unity of the YouTube channel Ten Minute Physics. My contribution is that I have translated the code from mainly JavaScript to C#, and I have commented the code to make it easier to understand what's going on. I have also fixed a few minor bugs and improved the performance.

1-2. Cannon ball

Simulate a bouncy cannon ball.

3. Billiard

Simulate billiard balls with different size and mass. Watch this YouTube video for examples:

4. Pinball

Simulate a pinball game.

5. Beads on wire

Simulate beads attached to a circular wire.

6. Pendulums

Simulate the chaotic behavior of pendulums with as many arms as you want and where each arm can have different mass. With many arms you get a rope or hair! Watch these YouTube videos for examples:

7. 3d Vector Math for Simulation

Nothing to simulate

8. Interaction

Catch and throw a ball with your mouse.

9. Getting ready to simulate the world with XPBD

Nothing to simulate

10. Soft body physics

Simple unbreakable soft body bunny physics. You can flatten it and throw it around with your mouse.

11. Find overlaps among objects

Find overlaps among thousands of objects blazing fast. Implements a version of the Spatial Partitioning design pattern called "Spatial Hashing" which is really useful if you have an unbounded grid.

12. Optimized soft body physics (TODO)

Is not optimizing the code from #11, but is showing how you can use a more detailed mesh and make that faster. You use two meshes: one with fewer triangles that is tetrahedralized, and one with more triangles, and then they interract during the simulation.

13. Tetrahedralizer (TODO)

Implemetation of an algorithm that splits a mesh into tetrahedrons. Will be available here when finished: Open source Computational Geometry library

14. Cloth simulation

Basic cloth simulation.

15. Cloth self-collisions

TODO

16. Simulation on the GPU

TODO

17. Eulerian Fluid Simulator with 200 lines of code

Spoiler: It's just the simulation part that's 200 lines of code. You need a few more lines of code to set it up, display it on screen, etc. Watch this YouTube video for examples:

18. FLIP Water Simulator

19. Differential equations and calculus from scratch

Simulate a car showing the graphs of distance, velocity, and acceleration.

Display the Julia set and Mandelbrot fractals

20. Height-field water simulation

Simulate a swimming pool with balls.

21. Fire simulator

TODO

22. Basic rigid body simulator

Simulating rigid bodies in 3d using XPBD (Extended Position Based Dynamics) physics simulation.

23. Sweep and Prune collision detection

A fast way to check collisions between many objects by checking each object's Axis-Aligned Bounding Box (AABB). Is related to "11. Find overlaps among objects" but can handle objects with different sizes.

24. Bounding Volume Hierarchies

TODO

25. Joint simulation made simple

Spoiler: It's not simple :) Anyway some joints are mirrored compared to the demo most likely because difference in coordinate system. Damping might not work but that's a later problem...

Bonus

Bonus implementations related to the code above.

3-Body Problem

Simulation of planetary orbits based on this famous unsolved problem (https://en.wikipedia.org/wiki/Three-body_problem). Watch this YouTube video for examples:

Calculate pi

Calculate decimals in pi by bouncing boxes with different mass and count collisions. If the small box is 1 kg and the big box is 10000 kg, then the small box will collide with the big box and the wall to the left 314 times (pi = 3.14...). To get more decimals increase the mass of the big box (or decrease the mass of the small box). Inspired by 3Blue1Bown's YouTube video: The most unexpected answer to a counting puzzle.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#cloth-simulationcomputer-sciencecsharpdouble-pendulum

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理