= Simulation - Particles path:: Path of the code: [05_particles] :: gap::
The objective is to model particles falling under gravity. Each particle has a position \(p_i\) and a speed \(v_i\).
gap:: * **Fill the function `update_speed`** (file `src/simulation/simulation.cpp`) that applies the gravity: ** \(v = v + \Delta t \,F/m\) ** __The mass is the variable `m` of each particle.__ code::[c++] void update_speed(particle_structure& p, float dt) { vec3 const g = {0.0f, 0.0f, -9.81f}; p.v = p.v + dt * g; } code::[-] gap::s * Note: the functions of link::https://graphicscomputing.fr/cgp/documentation/sitemap/vec.html[vec3] are listed in its documentation. center:: videoplay::assets/video.mp4[width:100%; max-width:300px;] caption:: Expected result :: ::