Coordinates of Points Calculator (Externally/ Internally)

X1: Y1:
X2: Y2:
Ratio
m: n:
     
Coordinates of Point
var cleanstring = x1.replace(/\,/g,''); no=cleanstring.length; switch(no) { case 3: str=cleanstring.substr(0); document.getElementById(ids).value=str; break; case 4: str=cleanstring.substr(1); str1=cleanstring.substr(0,1); document.getElementById(ids).value=str1+","+str; break; case 5: str=cleanstring.substr(2); str1=cleanstring.substr(0,2); document.getElementById(ids).value=str1+","+str; break; case 6: str=cleanstring.substr(3); str1=cleanstring.substr(1,2); str2=cleanstring.substr(0,1); document.getElementById(ids).value=str2+","+str1+","+str; break; case 7: str=cleanstring.substr(4); str1=cleanstring.substr(2,2); str2=cleanstring.substr(0,2); document.getElementById(ids).value=str2+","+str1+","+str; break; case 8: str=cleanstring.substr(5); str1=cleanstring.substr(3,2); str2=cleanstring.substr(1,2); str3=cleanstring.substr(0,1); document.getElementById(ids).value=str3+","+str2+","+str1+","+str; break; case 9: str=cleanstring.substr(6); str1=cleanstring.substr(4,2); str2=cleanstring.substr(2,2); str3=cleanstring.substr(0,2); document.getElementById(ids).value=str3+","+str2+","+str1+","+str; break; case 10: str=cleanstring.substr(7); str1=cleanstring.substr(5,2); str2=cleanstring.substr(3,2); str3=cleanstring.substr(1,2); str4=cleanstring.substr(0,1); document.getElementById(ids).value=str4+","+str3+","+str2+","+str1+","+str; break; case 11: str=cleanstring.substr(8); str1=cleanstring.substr(6,2); str2=cleanstring.substr(4,2); str3=cleanstring.substr(2,2); str4=cleanstring.substr(0,2); document.getElementById(ids).value=str4+","+str3+","+str2+","+str1+","+str; break; case 12: str=cleanstring.substr(9); //1,11,11,11,11,111 str1=cleanstring.substr(7,2); str2=cleanstring.substr(5,2); str3=cleanstring.substr(3,2); str4=cleanstring.substr(1,2); str5=cleanstring.substr(0,1); document.getElementById(ids).value=str5+","+str4+","+str3+","+str2+","+str1+","+str; break; } } -->

Section or Ratio Externally

(mx2-nx1)/(m-n),(my2-ny1)/(m-n),

Section or Ratio Internally

(mx2+nx1)/(m+n),(my2+ny1)/(m+n),

Section formula or Ratio formula to find the coordinates of a point P which divides the segment internally or externally in the ratio m : n.

For example, when m : n = 2 : 1, x1 = 2, y1 = 3 and x2 = 4, y2 = 5 (internally)

Apply them into formula

(mx2+nx1/m+n , my2+ny1/m+n)
(2*4+1*2/2+1 , 2*5+1*3/2+1)
(3.3  , 4.3)
Buy A Calculator On Amazon
Coordinates of Points Calculator (Externally/ Internally)