anchor.diff:          break;
         
         LineSegment line = Lines[i][counter];
  -      if (line.visible) {
  +      if (!hideTest) {
           geometry.vertices.add(new Vector3(line.start.x, line.start.y, 0.0));
           geometry.vertices.add(new Vector3(line.end.x, line.end.y, 0.0));
         } else {
  -        var line = new Line(geometry, material);
  -        scene.add(line);
  -        geometry = new Geometry();
  +        if (!line.hidden) {
  +          geometry.vertices.add(new Vector3(line.start.x, line.start.y, 0.0));
  +          geometry.vertices.add(new Vector3(line.end.x, line.end.y, 0.0));
  +        } else {
  +          var line = new Line(geometry, material);
  +          scene.add(line);
  +          geometry = new Geometry();
  +        } 
         }
         counter++;
       }
  
positive.code:         // Determine if line should be visible or hidden: compare y of start points
          bool aboveHorizon = line.start.y > intersector.start.y;
          
          // If line start is above horizon start, line should be visible and replace horizon line
          if (aboveHorizon) {
            List<LineSegment> split = line.split(intersectionPoint);
            List<LineSegment> horizonSplit = line.split(intersectionPoint);
          } else { // If line start is below horizon start, line should be invisible. 
            
          }
          
          
        }
      }
    }
    
    // Iteration first try
  //  for (LineGroup lineGroup in Lines) {
  //    // TODO: Iterable?
  //    // TODO: We don't need to check against all other lines, only horizon.
  //    for (LineSegment line in lineGroup.Line) {
  //      // Get all other lines which start before and end after this one
  //      List<LineSegment> possibleIntersectors = getPossibleIntersectors(line, Lines.indexOf(lineGroup));
  //      print('Number of possibles: ' + possibleIntersectors.length.toString());
  //      for (LineSegment intersector in possibleIntersectors) {
  //        Vector2 intersectionPoint = intersects(line, intersector);
  //        if (intersectionPoint != null) {
  //          intersectionPoints.add(intersectionPoint);
  //        }
  //      }
  //    }
  //    
  //  }
    
    // TODO: Iteration
  //  Vector2 intersectionPoint = intersects(a[0], b[0]);
  //  if (intersectionPoint != null)
  //  {
  //    // Split and replace
  //    List<LineSegment> split = a[0].split(intersectionPoint);
  //    a.removeAt(0);
  //    a.insert(0, split[0]);
  //    a.insert(1, split[1]);
  //    
  //    split = b[0].split(intersectionPoint);
  //    b.removeAt(0);
  //    b.insert(0, split[0]);
  //    b.insert(1, split[1]);
  //    
  //    // Hide second part of second line
  //    b[1].visible = false;
  //    print(b.toString());
  //  }
  //  
  //  intersectionPoint = intersects(a[2], b[2]);
  //  if (intersectionPoint != null) {
  //    var split = a[2].split(intersectionPoint);
  //    a.removeAt(2);
  //    a.insert(2, split[0]);
  //    a.insert(3, split[1]);
  //    
  //    split = b[2].split(intersectionPoint);
  //    b.removeAt(2);
  //    b.insert(2, split[0]);
  //    b.insert(3, split[1]);
  //    b[2].visible = false;
  //  }
  }
  
  void drawLineSegments() {
    for (int i = 0; i < Lines.length; i++) {
      var material = new LineBasicMaterial(linewidth: 100.0, color: (i == 0 ? 0x0077dd : 0xff0000));
      var geometry = new Geometry();
      bool done = false;
      int counter = 0;
  
negative.code:   String toString() {
      String out = "";
      for (LineSegment line in Line) {
        out += line.toString() + " (" + (line.hidden ? "hidden" : "visible") + ")";
      }
      return out;
    }
    
    List<LineSegment> split(LineSegment line, Vector2 intersectionPoint) {
      int index = Line.indexOf(line);
      List<LineSegment> splitLines = line.split(intersectionPoint);
      
      // TODO: Remove helper functions if this is the only place they're used
      removeAt(index);
      insert(index, splitLines[0]);
      insert(index + 1, splitLines[1]);
      return splitLines;
    }
  }
  
  