Re: Gridded1dDoubleSet Problem

Hi Larsson,

Try a Gridded2DSet with manifold dimension 1, like so:

  RealType x = new RealType("X", SI.meter, null);
  RealType y = new RealType("Y", SI.meter, null);
  RealTuple tuple = new RealTuple(x, y);
  float[][] vals = {
    {0.5f, 1.0f, 1.0f, 0.5f},  // x values
    {0.5f, 1.0f, 0.5f, 0.5f}   // y values
  };
  Gridded2DSet set = new Gridded2DSet(tuple, vals, 4);

-Curtis

At 07:01 AM 4/17/2002, Praktikanten-Account wrote:
>hello mailinglistEner
>
>i have a problem.
>i would like to draw a triangle with the x,y coordinates (0.5/0.5 |
>1.0/1.0 | 1.0/0.5 | 0.5/0.5)
>i wrote something like this
>
>  x = new RealType("X", SI.meter, null);
>  y = new RealType("Y", SI.meter, null);
>
> double [][] x_vals = new double[][]{{0.5,1.0,1.0,0.5}};
>
> x_set = new Gridded1DDoubleSet(x, x_vals, 4);
>
> double [][] y_vals = new double[][]{{0.5,1.0,0.5,0.5}};
>
>
>and he shows me after the start this Set.Exception
>
>Gridded1DDoubleSet: samples do not form a valid grid (2)
>
>i think that is because of the same coordinates and the
>Gridded1DDoubleSet.
>but which set should i use ?
>
>thanks
>larsson