code: public void set(boolean index, double x, double y) {
          this.MODE = LINES;
          if (index == true) {
              this.x1 = x;
              this.y1 = y;
          } else {
              this.x2 = x;
              this.y2 = y;
          }
  
          calcG();
          dx[0] = x1 - this.x;
          dx[1] = x2 - this.x;
          dy[0] = y1 - this.y;
          dy[1] = y2 - this.y;
          dz[0] = z1 - 0;
          dz[1] = z2 - 0;
          if (dashed) calcDashedLine();
      }
docs: Sets the coordinates for the first or second point.
  
  @param index choose the point; if index is true, the point is first.
  @param x The x-coordinate of the first or second control point.
  @param y The y-coordinate of the first or second control point.