Hello All,
Surely, it is an entry-level question, but all I wish to know is how to tell the Euclidean distance of a random scribble (the total length of all the lines), such as one generated by
Graphics[Line[RandomReal[1,{30,2}]]]
Many thanks,
Balazs
mthiel
(Marco Thiel)
April 25, 2016, 9:09pm
2
Hi,
please try
ArcLength@Line[RandomReal[1, {30, 2}]]
Cheers,
M.
seanc
(Sean Clarke)
April 25, 2016, 9:37pm
3
You can use the ArcLength function:
ArcLength[Line[RandomReal[1, {30, 2}]]]
But unfortunately, that doesn’t really teach anything about programming. If you want to learn more, you should try:
Writing a function that finds the length of a single line.
Writing a function that finds the length of a list of lines.
Thank you very much, it helped!
Cheers,
B.