|
From: Ethan M. <merritt@u.washington.edu> - 2005-10-11 16:52:15
|
[moving this to the mailing list for discussion] I wrote> > This patchset adds a qsort() of the points in a 3D > plot, so that you get proper occlusion of distant > points by close points. The improvement is particularly > noticible for large solid points. See for example the > plots in rgb_variable.dem Petr Mikulik replied> > The series of points can be a time sequence, and there it > would be useful to draw them (into a map) as they appear in > the data file, without ordering. I do not understand this example. Could you explain what the x, y, and z coordinates would be in this case? Let me clarify that the sort operation only applies to the order in which the points are drawn on the screen. It does not change their connectivity or ordering within the plot. So if you draw in style "with linespoints" the lines will still run from point 1 to point 2 to point 3 and so on, regardless of their relative Z values in the current view. However, if point 2 is closer to the viewer than points 1 and 3, it will occlude them. Of course in that case the line segments will not be sorted, even though their endpoints are. The result is imperfect, but is better than what we have now. However, I am having second thoughts about whether it is worth adding this sort operation outside of the hidden3d code. It does not handle the general case of mixing points from multiple sources into one plot. Suppose you are inspecting two sets of 3D data points, hoping to find that one set clusters in a different region of 3-space than the other. gnuplot> splot "class1" with points, "class2" with points The patch I posted would sort the "class1" points relative to each other, and the "class2" points relative to each other, but all the points from class2 will occlude all of the points from class1 because they are drawn afterwards. Not good. So even though the simple sort patchset was useful to me for the specific plots I was trying to make last week, I think that the longer term plan should be to extend the category of plots handled by "set hidden3d". In particular the hidden3d code could sort points and line segments even if there is no surface present, and it could track the full set of properties associated with each point or line segment. I am not clear on how this would fit in with Johannes Zellner's patch #1077726 "true depth ordering for pm3d plots". Have you looked at that patchset? -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |