|
From: Daniel J S. <dan...@ie...> - 2016-05-23 23:25:01
|
I've read through the documentation for the option "with ...
nohidden3d". My initial understanding of the nohidden3d option is that
it could be a means to individually select what items are included in
hidden line removal:
"
As of gnuplot version 4.6, hidden3d also affects 3D plotting styles
`points`,
`labels`, `vectors`, and `impulses` even if no surface is present in
the graph.
Unobscured portions of each vector are drawn as line segments (no
arrowheads).
Individual plots within the graph may be explicitly excluded from this
processing by appending the extra option `nohidden3d` to the `with`
specifier.
"
I'm not sure how "even if no surface is present in the graph" is to be
interpreted. I take it to mean there is something in plots, currently,
other than surfaces which can have a 2D subspace that obscures the
visual field.
More than that though is this phrase "excluded from this processing".
It's ambiguous as to what "this processing" applies to. There are two
ways to take this:
1) "nohidden3d" applies to any object because "individual plots" would
include anything.
2) "nohidden3d" only applies to points, labels, vectors and impulses.
My initial thought was that 1 is the case, but the current version of
gnuplot does nothing to "with lines" objects when 'with ... nohidden3d'
is specified. The "with lines nohidden3d" still has hidden3d effects.
So, 2 seems more the case and to confirm that, here is the code from
plot3d.c:
/* Rule out incompatible line/point/style options */
if (this_plot->plot_type == FUNC3D) {
if ((this_plot->plot_style & PLOT_STYLE_HAS_POINT)
&& (this_plot->lp_properties.p_size == PTSZ_VARIABLE))
this_plot->lp_properties.p_size = 1;
}
if (this_plot->plot_style == LINES) {
this_plot->opt_out_of_hidden3d = FALSE;
}
My thought on this is, Why exclude lines from the "nohidden3d" option?
If no hidden 3d processing is done on the surface lines, would that pose
a problem? Also, "LINES" is excluded, but why then not "LINESPOINTS"?
Just to illustrate, try these plots:
gnuplot> set samples 20
gnuplot> set hidden3d
gnuplot> splot 20*sin(x*y)/(x*y) with lines, x+y with lines nohidden3d
The above just illustrates that "lines" is unaffected by "nohidden3d".
Now try
gnuplot> splot 20*sin(x*y)/(x*y) with lines, x+y with lp nohidden3d
So, linespoints is affected. However, although the points behave as
expected, the lines have disappeared. Why should the lines disappear?
I would think the second plot should look very similar to this result:
gnuplot> unset hidden3d
gnuplot> splot 20*sin(x*y)/(x*y) with lines, x+y with lp
Again to illustrate the disappearing lines, try:
gnuplot> set hidden3d
gnuplot> splot 20*sin(x*y)/(x*y) with linespoints nohidden3d
*All* edges undefined or out of range, thus no plot.
Maybe the current behavior isn't the intended behavior, but I'm not
fully comprehending the nohidden3d option.
Dan
|