x = moment.m10/area; y = moment.m01/area; Point a; a = Point(x,y); vector<Point> cont(0); cont.push_back(a); for(int i= 0; i < (cont.size()-1); i++) { p = pow((cont.at(i).x - cont.at(i+1).x),2); q = pow((cont.at(i).y - cont.at(i+1).y),2); r = sqrt(p+q); cout<<r<<endl; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)