class sinkp { float locx; float locy; float strength; sinkp(float locx_, float locy_, float strength_) { locx=locx_; locy=locy_; strength=strength_; } float getLOCX() {return locx;} void setLOCX(float locx_) {locx = locx_;} float getLOCY() {return locy;} void setLOCY(float locy_) {locy = locy_;} float getS() {return strength;} void setS(float strength_) {strength = strength_;} float dirx(float x, float y) { float mx, my, distm, an; mx=x-locx; // positive if 1 to the right of 2 my=y-locy; //positive if 1 below 2 distm=sqrt(mx*mx+my*my); an=atan2(my,mx); //return -1*strength*cos(an); return -1*strength*(1/(sqrt(distm)+1))*cos(an); } float diry(float x, float y) { float mx, my, distm, an; mx=x-locx; // positive if 1 to the right of 2 my=y-locy; //positive if 1 below 2 distm=sqrt(mx*mx+my*my); an=atan2(my,mx); return -1*strength*(1/(sqrt(distm)+1))*sin(an); } void rendersinkfield() { for(float i=0; i