Not sure how youve exactly implementing it, but if you have the x,y cooridinates of the Joints then most of the hard work is done. My advice would be to use one line and assume that line starts at 0, and ends at say 5. therefore that line goes from 0=> y <=5 and x = 0;
Next you could write an abstract function that takes the parameters (x1,x2,y1,y2)
Inside that function is where you calculate the line equation. This equation is what you test. for instance your balls x and y will hit that line and then your software will throw up an alert or whatever you want the ball to do when it crosses or hits.
If you do the function abstract you can then implement this on all of the joints.
Plus if you can add the x stuff the way youve added the y and constantly have that function update you can effectively have that blob floating and rotating in your space.
Hope this helps