Using surface to create a patch grid results in a jagged surface.
[x,y]=meshgrid(-2:0.5:2,-2:0.5:2);
z = x.^2-cos(5*x).*y.^2;
surface(x,y,z,'EdgeColor',[.8 .8 .8],'FaceColor','none')
Because I'm computing contour's and full colored surfaces I have a much finer meshgrid than above.
[x,y]=meshgrid(-2:0.01:2,-2:0.01:2);
z = x.^2-cos(5*x).*y.^2 + 0.3;
surf(x,y,z, 'EdgeColor', 'none');
alpha(0.35);
colormap(bone(512));
I would like to use the finer grid as a way to interpolate the grid lines for the grid plot so make it smoother. (or essentiallly draw every 5 to 10 grid lines on a finer grid)
If I use the finer meshgrid then I get too dense grid lines which makes it useless.
I also use hidden surface removal so I assume that the grid has to be made up of patches which have linear edges. This probably means I can't do what I want to do ;.
Any ideas?
|
|
0
|
|
|
|
Reply
|
Jo
|
4/13/2010 2:24:05 AM |
|
"Jo " <bobbyjoe23928@gmail.com> wrote in message <hq0kk5$g87$1@fred.mathworks.com>...
> Using surface to create a patch grid results in a jagged surface.
>
> [x,y]=meshgrid(-2:0.5:2,-2:0.5:2);
> z = x.^2-cos(5*x).*y.^2;
> surface(x,y,z,'EdgeColor',[.8 .8 .8],'FaceColor','none')
>
>
> Because I'm computing contour's and full colored surfaces I have a much finer meshgrid than above.
>
> [x,y]=meshgrid(-2:0.01:2,-2:0.01:2);
> z = x.^2-cos(5*x).*y.^2 + 0.3;
> surf(x,y,z, 'EdgeColor', 'none');
> alpha(0.35);
> colormap(bone(512));
>
> I would like to use the finer grid as a way to interpolate the grid lines for the grid plot so make it smoother. (or essentiallly draw every 5 to 10 grid lines on a finer grid)
>
> If I use the finer meshgrid then I get too dense grid lines which makes it useless.
>
> I also use hidden surface removal so I assume that the grid has to be made up of patches which have linear edges. This probably means I can't do what I want to do ;.
>
> Any ideas?
not clear on what you want.. using a fine meshgrid and surf to plot results in a smooth surface...If grid lines are too dense, turn them off. Use contour to plot contour lines at an interval you specify.
John D'Errico's submission GridFit may be of use.
|
|
0
|
|
|
|
Reply
|
James
|
6/17/2010 6:11:04 PM
|
|
"Jo " <bobbyjoe23928@gmail.com> wrote in message <hq0kk5$g87$1@fred.mathworks.com>...
> Using surface to create a patch grid results in a jagged surface.
>
> [x,y]=meshgrid(-2:0.5:2,-2:0.5:2);
> z = x.^2-cos(5*x).*y.^2;
> surface(x,y,z,'EdgeColor',[.8 .8 .8],'FaceColor','none')
>
>
> Because I'm computing contour's and full colored surfaces I have a much finer meshgrid than above.
>
> [x,y]=meshgrid(-2:0.01:2,-2:0.01:2);
> z = x.^2-cos(5*x).*y.^2 + 0.3;
> surf(x,y,z, 'EdgeColor', 'none');
> alpha(0.35);
> colormap(bone(512));
>
> I would like to use the finer grid as a way to interpolate the grid lines for the grid plot so make it smoother. (or essentiallly draw every 5 to 10 grid lines on a finer grid)
>
Is this what you're looking for?
http://www.mathworks.com/matlabcentral/fileexchange/9315-wireframe
[x,y]=meshgrid(-2:0.01:2,-2:0.01:2);
z = x.^2-cos(5*x).*y.^2 + 0.3;
surf(x,y,z, 'EdgeColor', 'none');
alpha(0.35);
colormap(bone(512));
wireframe(x,y,z,50);
-Kelly
|
|
0
|
|
|
|
Reply
|
Kelly
|
6/17/2010 9:06:21 PM
|
|
|
2 Replies
832 Views
(page loaded in 0.044 seconds)
Similiar Articles: Smooth surface mesh/grid - comp.soft-sys.matlabUsing surface to create a patch grid results in a jagged surface. [x,y]=meshgrid(-2:0.5:2,-2:0.5:2); z = x.^2-cos(5*x).*y.^2; surface(x,y,z,'Edg... Mesh with different color at x=0 and y=0 - comp.graphics.apps ...Smooth surface mesh/grid - comp.soft-sys.matlab [x,y]=meshgrid(-2:0.5:2,-2:0.5:2); z = x.^2-cos(5*x ... Smooth surface mesh/grid - comp.soft-sys.matlab Because I'm ... Creating Smooth Edges - comp.graphics.api.openglSmooth surface mesh/grid - comp.soft-sys.matlab Creating Smooth Edges - comp.graphics.api.opengl Plot the edges of a surface - comp.soft-sys.matlab Smooth surface mesh ... Coordinate transformation - cylindrical to cartesian - comp.soft ...Smooth surface mesh/grid - comp.soft-sys.matlab Using surface to create a patch grid results in a jagged surface. [x,y]=meshgrid(-2:0.5:2,-2:0.5:2); z = x.^2-cos(5*x).*y ... contourf with squares not interpolated contours? - comp.soft-sys ...Smooth surface mesh/grid - comp.soft-sys.matlab contourf with squares not interpolated contours? - comp.soft-sys ... Smooth surface mesh/grid - comp.soft-sys.matlab ... Surface Plot - comp.soft-sys.matlabSmooth surface mesh/grid - comp.soft-sys.matlab not clear on what you want.. using a fine meshgrid and surf to plot results in a smooth surface...If grid lines are too ... Contours to polygons - comp.soft-sys.matlabSmooth surface mesh/grid - comp.soft-sys.matlab Contours to polygons - comp.soft-sys.matlab Smooth surface mesh/grid - comp.soft-sys.matlab Use contour to plot contour ... How to turn off lines in filled contour plot? - comp.soft-sys ...Smooth surface mesh/grid - comp.soft-sys.matlab not clear on what you want.. using a fine meshgrid and surf to plot results in a smooth surface...If grid lines are too ... CEILING ..., - comp.protocols.snmpceiling grid support ceiling grid punch ceiling grid ... ceiling tiles mesh ceiling tiles melanine ceiling tiles ... The upper interior surface of a room. b. Material used to ... Pacific Grid Tech, a high qaulity TEM grid provider, TEM grid, EM ...We provide highly smooth surface molybdenum grid, (Mo grid), which is the best grid in the ... 300 mesh titanium grid (from other company) 300 mesh molybdenum grid Smooth surface mesh/grid - comp.soft-sys.matlab | Computer GroupUsing surface to create a patch grid results in a jagged surface. [x,y]=meshgrid(-2:0.5:2,-2:0.5:2); z = x.^2-cos(5*x).*y.^2; surface(x,y,z,'Edg... 7/24/2012 12:46:36 AM
|