Analysis of knots and rays in planetary nebulae