-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submit your homework here #1
Comments
Repo link: https://github.com/chunleili/cloth-simulation-homework Description: complete the easy and medium tasks. Hard is not finished. And medium 2(prevent the cloth to be ripped) is not understood. Screenshots: demo.png |
@chunleili 不错!基本的挑战已经完成了。不过你的代码如果要添加很多球的话写起来就很麻烦了。其实有更简单的写法: ball_center = ti.Vector.field(3, dtype=float, shape=(3, ))
ball_center[0] = [-0.5, 0, 0]
ball_center[1] = [0, 0, 0]
ball_center[2] = [0.5, 0, 0] 就可以了。后面碰撞检测的时候可以直接用 for loop 遍历所有的球,不需要每个球都写一遍代码。 |
Repo link: https://github.com/tlcui/cloth_simulation_demo Description: 用C++和opengl实现了一下这个demo,可以添加更多的球,加了一个布料与小球摩擦的trick。在个人PC上执行比taichi的ti.cpu运行更快(相应的taichi实现也在该repo中 https://github.com/tlcui/cloth_simulation_demo/blob/master/cloth_simulation.py )。 碰撞和布料的自相交太难不会>_<。详细情况可见该repo的readme。 Screenshots: https://github.com/tlcui/cloth_simulation_demo/blob/master/results.gif |
@tlcui The repo is private? |
不好意思 操作失误。现在已经设置为公开了^_^ |
能用 C++ 和 opengl 实现也是很棒的了!穿模有点明显, 不过瑕不掩瑜。你的实现跑得比 taichi 快应该是可以预料的,因为taichi版本是跑在 cpu 上的。要不要在你的代码里面把开头改成 |
Hi, @chunleili @tlcui |
Please submit your homework in this issue. Recommended submission formats:
Repo link: https://github.com/your-name/your-repo
Description: which challenge did you finish? And quickly summarize what you did in your code.
Screenshots: https://raw.githubusercontent.com.../xxxx.png
The text was updated successfully, but these errors were encountered: