I thought about this for too long and could not find a simple answer anywhere, so I decided that I would post it here and save a lot of time. Despite the fact that the original post is out of date, I'm sure someone posted a simple answer long ago. That would save me a couple of days of experimentation.
public static Point PointFromEndOfLine(Point start, Point end, double distance)
{
double x = end.X-start.X;
double y = end.Y-start.Y;
double z = Math.Sqrt(x * x + y * y);
double ratio = distance / z;
double deltaX = x * ratio;
double deltaY = y * ratio;
return new Point(end.X-deltaX, end.Y-deltaY);
}
startPoint (x, y) endPoint (x, y) ( . , . startPoint endPoint, , . startPoint endPoint, startPoint endPoint .
, , - " ". . , X, x, y, z , , , .
: x/X == y/Y == z/Z
, -.