[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    Re: Fwd: Re: OPENGL patch for gnuplot
From:       Michael Cohen <mic109 () rsphy1 ! anu ! edu ! au>
Date:       2000-01-28 1:45:56
[Download RAW message or body]

On Fri, 28 Jan 2000, you wrote:
> > Not at all, f(x,y,z) could be given as a fourth column of the datafile as in:
> > sp "data" using 1:2:3:4. I guess it must ultimately be calculatable (or
> > measured) or else who knows what that color is? (it must be defined).
> 
> In this case, the fourth column isn't really a function of x, y, and z.  It,
> along with x, y, and z are all functions of some independent variable, like
> the line in the input file.  A better notation would be f(i), where i is the
> point number, or something like that.  Saying f(x,y,z) implies that f() is a
> function of *only* x, y, and z, and of no other parameters, which gets rid of
> the possibility of having two vertices with the same position but different
> colors, as might happen in an intersection of two surfaces of different color.

Thats true, but for interpolation each surface point has to have a well
defined color (even x,y,z not on the vertex i).  Perhaps a better way to say
this is that for each surface there is a function f(x,y,z) mapping the color on
the surface to (x,y,z), and that function is sampled at the vertices i, at all
other points not on vertices this function is linearly interpolated (when
interpolation is enabled). There is very subtle difference between the 2
definitions, mine being more restrictive. in the case of 2 intersecting
surfaces, each surface is drawn with its own mapping function, which may be the
same or not. So in this case the definitions are the same, but in the case of
an overlapping surface (i.e. a parametric isoline curve which has vertices
repeated with different colors), things get hairy. Because the
same vertex in space can have more than one color. For example imagine a
surface where two triangles are repeated, but the colors are different on
those repeated vertices With my definition, this is disallowed because you are
trying to define a multi-valued function over the same range. (Although
probably with any implementation that does not test for this condition, this
will just be ignored and still rendered incorrectly). With your definition
there will be no problem rendering 2 polygons taking the same 3D coordinates in
space and having different colors. Problem with opengl (and possibly other
renderes) is that this situation is undefined, which color do we display? So
you end up getting triangles that flash in color depending on the view point
and minute rounding errors in the implementation of the hardware.

This is the very subtle difference in our definitions. But for most situations,
the two are the same.

	Michael

[[[[ unsubscribe from info-gnuplot-beta via majordomo@dartmouth.edu ]]]]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic