Fec rendering is incorrect
Reported by Stéphane MOTTELET (@mottelet)
BUG DESCRIPTION:
----------------
The doc says
"More exactly if the colormap have nc colors and if we note dz = (zmax-zmin)/nc, then the part of the polygon mapping where zmin + (i-1)dz <= z < zmin + i dz is filled with the color i)".
This is not the case: as demonstrated in the below script and in the attached screenshot, the strips of the triangle should be of equal width, as in the colorbar, i.e. since linear behavior of z in the triangle is supposed.
If you need to draw n isovalue lines after a Fec call with a colormap with n-1 colors, then the isovalue lines do not match with the boundaries of color regions.
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
x=[0 1 0]';
y=[0 0 1]';
z=[0 1 1]';
triangles=[1 1 2 3 1];
clf
gcf().color_map = jetcolormap(4);
fec(x,y,triangles,z);
colorbar
OTHER INFORMATION:
------------------