I'm trying to find a forumla to determine where on a 2D coordinate system I will land. For example, say I'm at position (0,0) and am trying to head towards position (3,3), but can only move a length of 2 units, is there a way to determine the (x,y) coordinated i would land on by heading towards (3,3) and moving 2 units?
Mine only covers the specifics of the case given.
The length of the line from (0,0) to (3,3) is obtained using Pythagoras' Theorem.
At the point along that line that is length 2 units from the origin,
if you drop a perpendicular to the x-axis, then that's the x co-ordinate of the point in question.
If you draw a horizontal line to the y-axis, you have it's y co-ordinate.
The point's distance from the origin is of the distance from (0,0) to (3,3) which is 2 of course.
The x co-ordinate of the point is that fraction of the distance from (0,0) to (3,0)
and the y co-ordinate is that same fraction of the distance from (0,0) to (0,3).
If you draw a sketch, it will be clear.
If we go halfway along (0,0) to (3,3) that will be (1.5, 1.5).
If we go one third of the way, the point will be (1,1).
If we go two-thirds of the way, the point will be (2,2).
If we go of the way, the point will be