I have a series of circles in space and I am trying to find the intersections of a given line and the circles and storing that in an array using Table
. As the line will not intersect all circles the array has a number of empty entries
eg
int = {{}, {1, 2}, {}, {3, 4}, {}, {}, {}}
I am aware of Position
and Cases
and have had some success with something like:
Cases[int, Except[{}]]
But I cant figure out how to combine that with Position
to find the position of the non empty entries in the int
matrix.
Any help would be greatly appreciated.
Thanks