A percolation dynamic approach to the sol-gel transition