README for newhidden-990701.zip from HBB

Files in this .zip:

	README      --- this file
	diffs	    --- patches to protos.h and util3d.c: needed because
	                I moved back two function from hidden3d to util3d	hidden3d.c  --- replacement for old one
	dynarray.h
	dynarray.c  --- interface and implementation for an 'OO-style'
                        automatically growing array container for arbitrary
	                elements.

The dynarray stuff may be interesting for other coders, as well. It's meant
to be a rather general 'dynamic array of <something>' data type. The
implementation is OO-style, very loosely modeled along the lines of a Java
'vector'. Check the source and hidden3d.c for how to use it.

Some of the info-gnuplot-beta probably remember my statement that for any
substantial improvement of hidden3d regarding the remaining wrongly colored
lines (the 'bleed through of the back side' bug), a major rewrite of the
whole hidden3d.c machinery would be needed. This was my major excuse for not
tackling those problems during that endless freeze-for-release period of
time. Now that the dust of the post-release frenzy has settled, I finally
got round to doing that rewrite.

This is a preliminary release of that new code. Those of you brave enough to
actually try it out will notice that, at the moment, this code produces
*more* wrong-color errors than the old one, and is almost exactly as slow.
But then, I've only been working on this code for less than a month, with
several large interruptions, compared to the old code, which I've been
fooling around with over a period of over 2 years...

What then makes me confident that this code is better, you may ask? Well,
it's that I have now introduced explicit representation of edges, removing
the major source of the wrong-colour problem of the old code. There, edges
were only represented as members of polygons, and linetype data were stored
for polygons, instead of edges. As most edges are shared by two polygons,
each edge had two principally independent colours attributed to it, and it
depended on the (somewhat chaotic) order in which the two adjacent polygons
where drawn, which of the two colours was used.

The old code didn't really do hidden line removal, at all, but hidden
*surface* removal, with some additional machinery to make it work even
though only lines are really drawn, by gnuplot.

The new code really operates in terms of hiding lines behind polygons. The
colouring errors currently present exist because the setup routine that
builds the lists of polygons and edges doesn't make the link yet from a
newly built polygon to the edges it shares with previously stored ones, so
it can't check for conflicts in edge linetype, yet. As there's only exactly
one color per edge, now, it's just a matter of coding to fix that type of
error once and forever.

I also hope to be able to improve the speed of this routine heavily. As is,
the most time-consuming part of hidden3d is an inner loop with over one
hundred million iterations for a run through all.dem, on terminal x11. It
should be possible to speed that one up using the divide-and-conquer
technique (a BSP or 2d tree, or similar).

For now, feel invited to use this code and tell me what you think of it.
The plan is to replace the current code with this one, as soon as it's
stable enough for that.

