How can I draw an arrow starting from a point and ending up at a certain point on a curve being parallel to $y=-x$ line.

  • $\begingroup$ Look up Arrow, Graphics3D, and Show in the documentation. $\endgroup$ Oct 20, 2017 at 11:30
  • $\begingroup$ @HenrikSchumacher I had a quick look. My problem is that I don't know how can I draw an arrow parallel to a line. $\endgroup$
    – Immanuel
    Oct 20, 2017 at 11:38
  • $\begingroup$ @Immanuel Your problem statement seems to be unclear. If you know the end point and the slope, then you have specified the line the arrow lies on, and you can just pick another point on that line. What is making the problem harder than this? $\endgroup$
    – Alan
    Oct 20, 2017 at 12:51
  • $\begingroup$ @Alan I want to connect a point from a curve to a point from another one on a parallel line to $y=-x$ with an arrow. $\endgroup$
    – Immanuel
    Oct 20, 2017 at 12:57
  • $\begingroup$ @Alan I managed to draw a parallel arrow. I can't now say where the arrow should stop (meaning the end point on the second curve). $\endgroup$
    – Immanuel
    Oct 20, 2017 at 13:04

1 Answer 1

f1 = Sin   (* arbitrary first function *)
f2 = #^2/36 &  (* arbitrary second function *)
{x0, y0} = {1, f1[x0]}  (* arbitrary point on first fn *)
f3 = Function[x, y0 - (x - x0)] (* line though point *)
xsol = x /. Last@Solve[f2[x] == f3[x], x] (* line crosses 2nd fn *)
Plot[{f1[x], f2[x]}, {x, 0, 2 Pi},
 Epilog -> Arrow[{{x0, y0}, {xsol, f3[xsol]}}]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.