You will find the vector between two points and the point that divides a line in a given ratio, and then place four points along a line.
Your tasks.
vector, return the vector from the point p to the point q.divide, return the point P on the line from p to q with p to P : P to q equal to m : n.points to the four points that divide the line from A = (-2, 4) to B = (8, -6) in the ratios k : (5 - k) for k = 1, 2, 3, 4, in that order.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…