【作业1】flocking behavior

作业1

作业描述

实现了简单的flocking behavior 模拟。本想用quadtree来优化性能的,但是不会写orz。大佬们可以提供点思路吗?

效果展示

代码链接

Code

4 Likes

Quadtree需要使用Advanced data layout来编写,单单用ti.field()会比较困难,今天(10/12)上课我会讲:)

也欢迎check太极图形课第03节课的课件。

3 Likes

Not sure if this helps:


Using linear octree might accel this up, but it’s currently single-threaded due to the fact that Taichi can’t allocate thread-local array.

1 Like

太极之前版本的example里面有quadtree的例子,你可以参考: here

2 Likes