bugGNU Octave - Bugs: bug #51444, surf(): additional white lines in...

 
 

bug #51444: surf(): additional white lines in surface plot

Submitter:  Hartmut <hardy>
Submitted:  Tue 11 Jul 2017 05:49:53 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 4.2.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 14 Jul 2017 01:27:17 AM UTC, comment #3: 

The white lines are simply the axes color showing through.  You can check that by setting the axes background color to something vivid.  Assuming the sample code from comment #2 has been executed, try


set (gca, 'color', 'b')


This might be an Octave problem, but it's not an obvious one.  The lines appear to be where OpenGL has broken surfaces into triangles when tessellating the surface.  In particular, a square gets broken in to two triangles which "overlap" along the diagonal of the square.  I think someone who is a real OpenGL expert needs to review libinter/corefcn/gl-render.cc.

Rik <rik5>
Group administrator
Tue 11 Jul 2017 07:43:46 PM UTC, comment #2: 

I have compiled the current dev version of Octave (hg id b85a46745298 of today) on my Linux system:

  • I can confirm Dmitri's observation that the demo code in comment #0 does NOT have those white lines any more.
  • BUT when I use my mouse to rotate this 3d plot, then I DO see those white lines come back, quite often.


A demo script to reproduce those white lines in current dev Octave is this (just a changed view command):


clear, close all;
graphics_toolkit qt % fltk is the same, gnuplot is fine

x = [-3:1:3];
y = x;
[xx, yy] = meshgrid(x,y);
zz = xx .* yy;
zz(zz < 0) = 0;

surf(xx, yy, zz, 'EdgeColor', 'none');
view(30,85);
grid off;


I will attach a screenshot of this tilted 3d plot with current dev Octave (under Linux).



Hartmut <hardy>
Tue 11 Jul 2017 05:57:19 PM UTC, comment #1: 

That seems to be fixed in dev version.

Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Tue 11 Jul 2017 05:49:53 PM UTC, original submission:  

This happens with Octave 4.2.1 and the OpenGL toolkits . Here is how to reproduce it:


clear, close all;
graphics_toolkit qt % fltk is the same, gnuplot is fine

x = [-3:1:3];
y = x;
[xx, yy] = meshgrid(x,y);
zz = xx .* yy;
zz(zz < 0) = 0;

surf(xx, yy, zz, 'EdgeColor', 'none');
view(2);
grid off;


In the resulting (2d view on a) 3d surface plot, there are some additonal white lines visible. (They are also visible in other 3d view orientations.) Those white lines should not be there.

I have observed this with Windows 7 as well as with Ubuntu 16.04 linux.

The generated 3d plot of Matlab does not show those white lines. But I think this is not only a compatibility issue, but an Octave plotting bug on its own. Those white lines simply shouldn't be there, they spoil the appearance of the whole 3d plot.

I will attach 3 screenshots from Octave results (under Win7 and Ubuntu 16.04) as well as Matlab results (Win7).

Hartmut <hardy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #41169:  Screenshot_Octave_Win7.jpg added by hardy (87KiB - image/jpeg)
file #41170:  Screenshot_Matlab_Win7.jpg added by hardy (95KiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dasergatskov (Updated the item)
  • -email is unavailable- added by hardy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-14 rik5 StatusNone Confirmed
    2017-07-11 hardy Attached File- Added Screenshot_Octave-dev_Linux_(rotated).png, #41172
    2017-07-11 dasergatskov Attached File- Added 3e93a2a66cdf+_qt.png, #41171
    2017-07-11 hardy Attached File- Added Screenshot_Octave_Linux.png, #41168
        Attached File- Added Screenshot_Octave_Win7.jpg, #41169
        Attached File- Added Screenshot_Matlab_Win7.jpg, #41170

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code