A grassy area used as a park in the Libyan capital Tripoli was hit by shelling on Sunday that left at least three people dead and several others wounded, medics said.