plot3d polygon facets face wrong way when exactly in horizontal or vertical plane
Reported by Joe Seale
BUG DESCRIPTION:When plot3d draws a rectangular facet that lies exactly parallel of the xy or yz or zx plane, the front face and hidden face do not follow a right-hand rule for order-of-entry of the vertices. Perturbing the coordinates to tilt the facet even very slightly cause front and hidden faces to face properly
----------------
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
epsl = 0; // zero perturbation from face in zx plane
vert = [0 0 0; 1 epsl 0; 1 epsl 1; 0 0 1], // matrix display contains only numbers 0. and 1.
clf; a = plot3d(vert(:,1),vert(:,2),vert(:,3)); // plot, setting entity handle to "a"
a.hiddencolor = 5; // face toward viewer is "hidden" face and turns red, which is incorrect
epsl = 1e-7; // introduce small perturbation out of zx plane
vert = [0 0 0; 1 epsl 0; 1 epsl 1; 0 0 1], // matrix display shows 0.0000001 in y coords, 2nd & 3rd points
clf; a = plot3d(vert(:,1),vert(:,2),vert(:,3)); // plot just as before, but with small perturbation
a.hiddencolor = 5; // face toward viewer is "front" face and does not turn red, which is correct
// Rotating figure will reveal the "hidden" face, which is red, as it should be.
-------------------------
OTHER INFORMATION:
------------------