-2

enter image description here

Tom is a flatlander, meaning he can only see in a line. In front of him are a bunch of lines (they never cross). Is there a way based on Tom's position and the line endpoints to calculate which lines he sees first (overlap from his perspective) and which he sees last? (assuming he has unlimited 360° vision)

In this example AB, CD,EF,GH

By seeing first I mean that if they overlap from toms perspective and assuming they all had a unique color, the color that tom sees at the overlapping area determines which line is "in front". If 2 lines don't overlap from his perspective it doesn't really matter which comes first. Also we are always looking at 2 lines in isolation, so it doesn't matter if a 3rd line covers both.

Another way to think about it, imagine that we wanted to paint what tom sees. There should be an order in which we paint the lines on top of each-other to recreate toms vision. We are essentially looking for the inverse of that order (first drawn last, last drawn first)

  • Note that the Flatland assumption is needed. In 3D, you can have three line segments $AB$, $CD$, and $EF$ such that $AB$ is before $CD$, $CD$ before $EF$, and $EF$ before $AB$. – Hagen von Eitzen Sep 28 '23 at 09:30
  • What exactly is it that makes CD before EF? Is it that they partially overlap when seen from his perspective, and where they overlap, CD is closer? Because the moment you remove AB, I would think he saw both of the line segments simultaneously. – Arthur Sep 28 '23 at 09:33
  • @HagenvonEitzen I'm not sure that is true. Assuming the 3d lines have a little depth, and never touch, even if there is a point where they cross from the 2D persepctive of the viewer, one line will always be in front of the other at the crossing point – user2741831 Sep 28 '23 at 09:55
  • Is it that they partially overlap when seen from his perspective, and where they overlap, CD is closer? < this is the on. I'll make it clearer in the post – user2741831 Sep 28 '23 at 09:56

1 Answers1

2
  d|        c
   |----------
   |     |
   |  T  |
   |     |
---------|
  a      | b

Tom sees $a$ in front of $b$, $b$ in front of $c$, $c$ in front of $d$, and $d$ in front of $a$.

So you are not guaranteed that "in front of" is going to be an ordering for the line segments.

But to the more general question of how to determine if one line segment is in front of the other, that is simple. For two line segments $\overline{AB}, \overline{CD}$, simply draw the line segments from Tom's position $T$ to each of $A$ and $B$. If either of these intersects $\overline{CD}$, then $\overline{CD}$ is in front of $\overline{AB}$. If not, draw one more line (not segment) from $T$ to $C$. If it intersects $\overline{AB}$, but with $C$ being between $T$ and the point of intersection, then again, $\overline{CD}$ is in front of $\overline{AB}$. Otherwise $\overline{CD}$ is not in front of $\overline{AB}$.

Paul Sinclair
  • 43,643
  • 1
    You've already accepted the answer, but I realized I had left off a case for checking when one segment is in front of the other. I have now added that case. – Paul Sinclair Sep 29 '23 at 21:40