Mercurial > jwe > octave
changeset 26768:178fd5e6c0c2
maint: Merge stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 21 Feb 2019 20:11:33 +0000 |
parents | 12fe42e16841 (current diff) 8cfe07381fc0 (diff) |
children | c1d5a0a799b2 |
files | libinterp/corefcn/graphics.cc |
diffstat | 2 files changed, 23 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc Thu Feb 21 19:21:57 2019 +0000 +++ b/libinterp/corefcn/graphics.cc Thu Feb 21 20:11:33 2019 +0000 @@ -9474,7 +9474,8 @@ // check coplanarity for 3D-faces with more than 3 corners int fcmax = idx.rows (); - if (fcmax > 3 && vert.columns () > 2) + if (fcmax > 3 && vert.columns () > 2 && + ! (facecolor_is ("none") && edgecolor_is ("none"))) { for (octave_idx_type jj = 0; jj < idx.columns (); jj++) { @@ -9500,11 +9501,15 @@ fc(j,i) = vert(idx(j + i_start,jj)-1,i) - vert(idx(0,jj)-1,i); + // FIXME: Using svd's to check for co-planarity is slow + // for faces with many vertices. Is there a better way to + // check this? + // calculate rank of matrix octave::math::svd<Matrix> result (fc, octave::math::svd<Matrix>::Type::sigma_only, - octave::math::svd<Matrix>::Driver::GESVD); + octave::math::svd<Matrix>::Driver::GESDD); DiagMatrix sigma = result.singular_values (); double tol = nc * sigma(0,0) * std::numeric_limits<double>::epsilon ();
--- a/scripts/plot/draw/private/__scatter__.m Thu Feb 21 19:21:57 2019 +0000 +++ b/scripts/plot/draw/private/__scatter__.m Thu Feb 21 20:11:33 2019 +0000 @@ -201,16 +201,16 @@ if (one_explicit_color) for i = 1 : numel (x) if (filled) - __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x(i), "ydata", y(i), "zdata", z(i,:), "faces", 1, "vertices", [x(i), y(i), z(i,:)], - "facecolor", "none", "edgecolor", "none", "marker", marker, "markersize", s(i), "markeredgecolor", c, "markerfacecolor", c, "linestyle", "none"); else - __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x(i), "ydata", y(i), "zdata", z(i,:), "faces", 1, "vertices", [x(i), y(i), z(i,:)], - "facecolor", "none", "edgecolor", "none", "marker", marker, "markersize", s(i), "markeredgecolor", c, "markerfacecolor", "none", "linestyle", "none"); @@ -222,18 +222,18 @@ endif for i = 1 : numel (x) if (filled) - __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x(i), "ydata", y(i), "zdata", z(i,:), "faces", 1, "vertices", [x(i), y(i), z(i,:)], - "facecolor", "none", "edgecolor", "none", "marker", marker, "markersize", s(i), "markeredgecolor", "none", "markerfacecolor", "flat", "cdata", c(i,:), "facevertexcdata", c(i,:), "linestyle", "none"); else - __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x(i), "ydata", y(i), "zdata", z(i,:), "faces", 1, "vertices", [x(i), y(i), z(i,:)], - "facecolor", "none", "edgecolor", "none", "marker", marker, "markersize", s(i), "markeredgecolor", "flat", "markerfacecolor", "none", @@ -330,17 +330,17 @@ && strcmp (toolkit, "gnuplot")); if (ischar (c) || ! isflat || gnuplot_hack) if (filled) - __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x, "ydata", y, "zdata", z, "faces", 1:numel (x), "vertices", vert, - "facecolor", "none", "edgecolor", "none", "marker", marker, "markeredgecolor", "none", "markerfacecolor", c(1,:), "markersize", s, "linestyle", "none"); else - __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x, "ydata", y, "zdata", z, "faces", 1:numel (x), "vertices", vert, - "facecolor", "none", "edgecolor", "none", "marker", marker, "markeredgecolor", c(1,:), "markerfacecolor", "none", @@ -348,18 +348,18 @@ endif else if (filled) - __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x, "ydata", y, "zdata", z, "faces", 1:numel (x), "vertices", vert, - "facecolor", "none", "edgecolor", "none", "marker", marker, "markersize", s, "markeredgecolor", "none", "markerfacecolor", "flat", "cdata", c, "facevertexcdata", c, "linestyle", "none"); else - __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, + __go_patch__ (hg, "facecolor", "none", "edgecolor", "none", + "xdata", x, "ydata", y, "zdata", z, "faces", 1:numel (x), "vertices", vert, - "facecolor", "none", "edgecolor", "none", "marker", marker, "markersize", s, "markeredgecolor", "flat", "markerfacecolor", "none",