c++ - Polygon intersection with Boost::geometry severe performance deterioration -
i have particle system , using boost::geometry approximate elliptical particles polygons , use intersection function of library find overlap area. calculating "inner" , "outer" ellipse(polygon) area assign "potential" each particle-particle interaction. my potential function this: double potential(cell* current, cell* next) { double arearep, areaatt; double distance = distance(current,next); double a1 = current->getlength(); double b1 = a1/2.0; double theta1 = current->gettheta(); //*180.0/m_pi double x1 = current->getcurrx(); double y1 = current->getcurry(); double a2 = next->getlength(); double b2 = a2/2.0; double theta2 = next->gettheta(); double x2 = next->getcurrx(); double y2 = next->getcurry(); polygon_2d poly1, poly2, poly3, poly4; double lamda1, lamda2; lamda1 = 0.0005; lamda2 = 0.00001; if(distance < 2.0*1.5*a1) { ellipse2poly(theta1, a...