As the title says, I have a Line
object like this:
Line[{{1,2,3},{4,5,6},...,{7,8,9}}]
and want to extract certain points. I have no clue how to do this. Thanks for help
Using the third argument of Extract
:
ClearAll[extractPoints]
extractPoints = Extract[#, {1, ## & @@ #} & /@ #2, Point] &;
Example:
line = Line[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}];
extractPoints[line, {3, {1, 2}, {2, 3}}]
{Point[{7, 8, 9}], Point[2], Point[6]}
Line[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}][[1, 1]]
yields{1, 2, 3}
. $\endgroup$