Wed 21 Dec 2016 10:45:05 AM UTC, comment #2:
Hello,
I agree with the two messages and the same problem also occurs on Linux.
Using 'axis equal' for a 3D view with an empty range gives no output, while it worked for Octave 4.0.3 or 4.0.0. For example,
plot3([0 1],[0 1],[1 1])
axis equal
|
Thu 15 Dec 2016 05:45:18 PM UTC, comment #1:
I see the same here, 4.2.0, zip, 64bit.
Not specifically mentioned, but the
Bill does not specifically mention it, but he made the z-axis to span a zero range ( 0*p(:,1) )
Any dimension in the z-range and the plot is OK.
|
Thu 15 Dec 2016 03:09:03 PM UTC, original submission:
I tried to execute the code sample below with the 64-bit
version of octave on windows. Without the "axis equal" line
the plot looks fine. With that line, the plot shows many
fine parallel lines on my screen. The plot is correct with
the 32-bit version of octave 4.0.
function trisurf_mesh
m=11; n=11; % includes boundary nodes, mesh spacing 1/(m-1) and 1/(n-1)
[x,y]=ndgrid((0:m-1)/(m-1),(0:n-1)/(n-1)); % matlab forms x and y lists
p=[x(:),y(:)]; % N by 2 matrix listing x,y coordinates of all N=mn nodes
t=[1,2,m+2; 1,m+2,m+1]; % 3 node numbers for two triangles in first square
t=kron(t,ones(m-1,1))+kron(ones(size(t)),(0:m-2)');
% now t lists 3 node numbers of 2(m-1) triangles in the first mesh row
t=kron(t,ones(n-1,1))+kron(ones(size(t)),(0:n-2)'*m);
U=sin(pix).sin(pi*y);
figure; trisurf(t,p(:,1),p(:,2),0*p(:,1),U(:),'edgecolor','k','facecolor','interp');
axis equal
end
|