function for check the angle between the legs
pen for draw the invalid joints