@ti.kernel def initialize(): for i in range(N): pos[i]=[ti.random(),ti.random()] vol[i]=[ti.random(),ti.random()]
gui=ti.GUI("n body problem",(512,512)) while(gui.running): # for i in range(substepping): gui.circle(pos.to_numpy(),color=0xFFFFFF,radius=2) gui.show()