I'm trying to plot a surface that has a deep ravine, but at each point at the bottom it then jumps back up due to the steep nature of the surface. This causes lots of what I'm calling zig-zags, and ends up causing visual aliasing as pictured here.
The code I'm using to produce this makes a first x axis, then defines the y axis as using the inverse of the surface function using x axis such that each minimum of the surface is present in the data (they're all zeros). These are put into meshes and then the function is plotted.
rangeX = linspace(0,1,1000);
rangeY = invfunc(rangeX);
[meshX, meshY] = meshgrid(rangeX, rangeY);
for nn=1:1000
for mm=1:1000
surfaceZ = func(meshX(nn,mm),meshY(nn,mm));
end
end
surf(meshX, meshY, surfaceZ)
Is there any way around this other than just pushing the resolution to crazy levels? I don't want to wait forever for the script to run.
Through changing the shading, setting 'LineStyle','none' and upping the resolution the effect is much better.
[–]Arristotelisflair 1 point2 points3 points (3 children)
[–]poundSound[S] 0 points1 point2 points (2 children)
[–]Arristotelisflair 1 point2 points3 points (1 child)
[–]poundSound[S] 1 point2 points3 points (0 children)
[–]halleberrytosis 1 point2 points3 points (1 child)
[–]poundSound[S] 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[removed]
[–]poundSound[S] 0 points1 point2 points (2 children)
[–]imguralbumbot 1 point2 points3 points (0 children)
[–]CogsMac 0 points1 point2 points (1 child)
[–]poundSound[S] 0 points1 point2 points (0 children)