def METHOD_NAME(self, dt):
    # move the z vertices with the sin(x+y) function
    # to simulate a 3D flag effect
    self.elapsed += dt
    amplitud = 32
    for i in range(0, self.grid_size.x + 1):
        for j in range(0, self.grid_size.y + 1):
            x, y, z = self.get_vertex(i, j)
            z = (math.sin(self.elapsed * math.pi * 2 + (y + x) * .01) * amplitud)
            self.set_vertex(i, j, (x, y, z))