Hi, I've added the friction between screen boundary and points. The formula I used is based on: F_friction = -μ * F_normal * (v / |v|) F_friction: the friction force with component x and y. μ: Friction coefficient F_normal: the normal force between the point and the edge, because F = m * a, a = v / t. Both t and m are equal to 1 in your simulation, so the F_normal we can treat as velocity of the point. v: can be calculated by the x_new - x_old (new position - old position), because ∆v = ∆x / ∆t, where ∆t is 1 and ∆x = new_x - old_x Finally (v / |v|) is the normalized velocity which represents the direction of the friction force (Friction is always in the direction opposite to the velocity of the contact point between the object and the surface)