I am trying to generate some nice smooth gradients that compare with
photoshop for quality and am having a bit of bother.

The way I am doing it is to generate a texture of 256 x 1 pixels (for
linear) and 256 * 256 for radial, for my purposes this resolution works
well.  I cycle through each pixel and calculate an offset 0 <= t <= 1.  I
then use this to calculate how much of each color stop to use using the code
below.  The color stops are a struct like

struct stop
{
double offset;  // 0.0 <= offset <= 1.0
struct
{
double alpha;      // 0.0 <= blue <= 1.0
double red;       // 0.0 <= red <= 1.0
double green;    // 0.0 <= green <= 1.0
double blue;      // 0.0 <= blue <= 1.0
} color;

Quote:};

This seems to be reasonably good but I don't think it's quite right.   For
example, when I have 2 stops (0.0, white) and (1.0, white) I don't get a
solid white fill.  Instead I get something that looks somewhat sinusoidal
varying from solid white at both ends with a light gray in the middle.

Does anyone have any suggestions how I can improve my code?

classColor color = new classColor(0.0, 0.0, 0.0, 0.0);
int nStops = stops.Count;
foreach (elemStop stop in stops)
{
double deltaOffset = Math.Abs(stop.offset - t);
double factor = (1 - deltaOffset);

color.alpha += (factor * stop.color.alpha);

if (factor >= 0.0)
{
double a = Math.Log10(1.0 / (double) nStops);
double b = Math.Log10(deltaOffset);
if (b != 0.0)
factor = Math.Pow(factor,  a / b );
else
factor = 0;
}
color.red += (factor * stop.color.red);
color.green += (factor * stop.color.green);
color.blue += (factor * stop.color.blue);

Quote:}

Color pixColor = Color.FromArgb(color.GetAlphaByte(),  color.GetRedByte(),
color.GetGreenByte(), color.GetBlueByte());
pixelBuffer.SetPixel(x, y, pixColor);

hello.

i am searching a programme that may
according to acscii input like this:

x       y       z       depth
data    data    data    data

or

x       y       depth
data    data    data

the depth column should be plotted
as colour-coded. (so, i would like
to have a surface which is 'covered'
presumably, huge packages as maple
and such could do the job, but, please:
is there something simpler?