How can I know the length of each part of the arrow and what their full length?
points = {{6, 32}, {9, 53}, {18, 42}, {32, 51}};
Graphics[{Arrow[points]}]
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityYou can know the length of each part of the arrow and his full length in this way:
distList =
EuclideanDistance[points[[# + 1]], points[[#]]] & /@ Range[Length[points] - 1] // N
Plus @@ distList
{21.2132,14.2127,16.6433}
52.0692
EuclideanDistance @@@ Partition[points, 2, 1]
$\endgroup$
Total[]
afterwards.
$\endgroup$
Oct 5, 2016 at 20:18
To be concise in a different way:
N@Total@(Norm /@ Differences@points)
N[ArcLength/@Line/@Partition[points,2,1]]
{21.2132, 14.2127, 16.6433}
N@ArcLength[Line[points]]
52.0692