collision detection with irregular shape


hello i am making game in which i am making shape like diamond using ccdrawpoly method .

and i have sprit object with ball.png and i want to detect collision with this polygon (diamond shape) .

in short ball do not go through inside the shape please help me.......

Your diamond can likely be separated into a set of more basic shapes that can be used to do the intersection math more easily (triangles, squares)