MMA 10 introduced a new function, which can be very convenient: InfiniteLine
.
Of course, two infinite lines can be described by different arguments: for example InfiniteLine[{{0,0},{1,0}}]
and InfiniteLine[{{0,0},{2,0}}]
are identical. How can I delete duplicates in a list of infinite line?
For example,
lines = {InfiniteLine[{{0,0},{1,0}}], InfiniteLine[{{0,0},{2,0}}],
InfiniteLine[{{0,1},{1,0}}]};
myDeleteDuplicates[lines]
should return
{InfiniteLine[{{0,0},{1,0}}], InfiniteLine[{{0,1},{1,0}}]}
Edit In my original question, I had written
I would like to avoid if possible comparing lines "by hand", i.e. by translating and normalising the arguments of
InfiniteLine
.
I had not expected this constraint to result in a (possible) significant increase of computation time. Let's lift it, hoping it will not penalise the existing answerers too much.