Endpoint Finder by mullinator4th Sep 2007 19:30
|
---|
Summary calculates the second endpoint of a line from one endpoint and the midpoint Description calculates the second endpoint of a line from one endpoint and the midpoint Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com do `print "Midpoint of TS is (5,12), enter T and find S" input "Midpoint-X coord:", mx input "Midpoint-Y coord:", my print input "Endpoint-X coord:", x input "Endpoint-Y coord:", y ex = (2 * mx) + -x ey = (2 * my) + -y print "------------------" print "1st Endpoint: ("+str$(x)+","+str$(y)+")" print "Midpoint: ("+str$(mx)+","+str$(my)+")" print "------------------" print "New Endpoint: ("+str$(ex)+","+str$(ey)+")" print "" print "----------------------------------------" print "" loop |