*/
  public void map2d (int target, double u1, double u2, int ustride, int uorder,
                     double v1, double v2, int vstride, int vorder,
                     double [] points) {

    int k = 0;

    switch (target) {
    case MAP2_INDEX:            // fall through
    case MAP2_TEXTURE_COORD_1: k = 1; break;
    case MAP2_TEXTURE_COORD_2: k = 2; break;
    case MAP2_NORMAL:           // fall through
    case MAP2_TEXTURE_COORD_3:  // fall through
    case MAP2_VERTEX_3: k = 3; break;
    case MAP2_COLOR_4:          // fall through
    case MAP2_TEXTURE_COORD_4:  // fall through
    case MAP2_VERTEX_4: k = 4; break;
    }

    int n = vorder * uorder * k * 8;

    byte[] data = new byte [n];
    for (int i=0; i<vorder; i++) {
      for (int j=0; j<uorder; j++) {
        for (int m=0; m<k; m++) {
          write_double (data, i * 8, points [i*ustride + j*vstride + m]);
        }
      }
    }

    RequestOutputStream o = display.out;
    synchronized (o) {
      large_render_request.begin(o, 145, 48, n);
      large_render_request.write_float64 (u1);
      large_render_request.write_float64 (u2);
      large_render_request.write_float64 (v1);
      large_render_request.write_float64 (v2);
      large_render_request.write_int32 (target);
      large_render_request.write_int32 (uorder);
      large_render_request.write_int32 (vorder);
      large_render_request.begin_large_parameter ();
      for (int i = 0; i < data.length; i++)
        large_render_request.write_int8 (data [i]);
      large_render_request.write_pad (RequestOutputStream.pad(data.length));
    }

  }