4 deleted 51 characters in body edited Mar 6 '18 at 19:47 user5601 96711 gold badge1616 silver badges3737 bronze badges There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: Jason B gave a nice answer, but I realize now I needit needs it to work with both LineLine[]'s and InfiniteLine's. And naively changing __InfiniteLine to __InfiniteLine[] in, for which the triangles[] function below doesn't work: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines, LightBlue, Triangle /@ triangles[lines]}, Frame -> True, PlotRange -> All, AspectRatio -> 1] There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: Jason B gave a nice answer, but I realize now I need it to work with both Line's and InfiniteLine's. And naively changing __InfiniteLine to __ in the triangles[] function below doesn't work: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines, LightBlue, Triangle /@ triangles[lines]}, Frame -> True, PlotRange -> All, AspectRatio -> 1] There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: Jason B gave a nice answer, but it needs it to work with both Line[] and InfiniteLine[], for which the triangles[] function below doesn't work: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines, LightBlue, Triangle /@ triangles[lines]}, Frame -> True, PlotRange -> All, AspectRatio -> 1] Tweeted twitter.com/StackMma/status/971105743494635520 occurred Mar 6 '18 at 19:30 3 added 107 characters in body edited Mar 6 '18 at 18:39 user5601 96711 gold badge1616 silver badges3737 bronze badges There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: Jason B gave a nice answer, but I realizedrealize now I need it to work with both Lines's and InfiniteLines's. And naively changing __InfiniteLine to __ in the triangles[] function below doesn't work: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines(*, LightBlue, Triangle /@triangles[lines]*)@ triangles[lines]}, Frame -> True, PlotRange -> All]All, AspectRatio -> 1] There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: I realized I need it to work with both Lines and InfiniteLines: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines(*,LightBlue,Triangle/@triangles[lines]*)}, Frame -> True, PlotRange -> All]  There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: Jason B gave a nice answer, but I realize now I need it to work with both Line's and InfiniteLine's. And naively changing __InfiniteLine to __ in the triangles[] function below doesn't work: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines, LightBlue, Triangle /@ triangles[lines]}, Frame -> True, PlotRange -> All, AspectRatio -> 1] 2 added 385 characters in body edited Mar 6 '18 at 18:33 user5601 96711 gold badge1616 silver badges3737 bronze badges There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: I realized I need it to work with both Lines and InfiniteLines: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines(*,LightBlue,Triangle/@triangles[lines]*)}, Frame -> True, PlotRange -> All]  There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] There are at least a few non-overlapping triangles made by the lines in the following graphic, how would I isolate them? pts = RandomReal[1, {7, 2, 2}]; g = Graphics[{InfiniteLine @@@ pts}, Frame -> True, PlotRange -> {{-1, 2}, {-1, 3}}] Update: I realized I need it to work with both Lines and InfiniteLines: SeedRandom; pts = RandomReal[1, {3, 2, 2}]; l = InfiniteLine @@@ pts; h = Line@{{{0, 0}, {0, 2}}, {{0, 1}, {1, 1}}, {{1, 0}, {1, 2}}}; lines = Join[l, {h}]; g = Graphics[{lines(*,LightBlue,Triangle/@triangles[lines]*)}, Frame -> True, PlotRange -> All]  1 asked Mar 6 '18 at 16:47 user5601 96711 gold badge1616 silver badges3737 bronze badges