updated collsion algorithm with rectangle2d Intersection and size of
component are now defined by ratios