How to Build GPU-Accelerated Simulations and Unique Physics Workflows Using NVIDIA Warp Kernels
angles = np.linspace(0.0, 2.0 * np.pi, n_particles, endpoint=False, dtype=np.float32) px0_np = 0.4 * np.cos(angles).astype(np.float32) py0_np = (0.7 + 0.15 * np.sin(angles)).astype(np.float32) vx0_np = (-0.8 * np.sin(angles)).astype(np.float32) vy0_np = (0.8 * np.cos(angles)).astype(np.float32) px0_wp = wp.array(px0_np, dtype=wp.float32, device=device) py0_wp = wp.array(py0_np, dtype=wp.float32, device=device) vx0_wp = wp.array(vx0_np, dtype=wp.float32, device=device) vy0_wp = wp.array(vy0_np, dtype=wp.float32, device=device) state_size = (steps + … Read more