I have a surface created with TriScatteredInterp, exactly as in the example here: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/triscatteredinterpclass.html Now i need a 2D line plot of the intersection of a vertical plane with this surface. This should be a very common problem, just the depth/elevation profile of a surface along a line, but I cannot find an example.

0 |

11/19/2009 7:20:22 PM

"Noel Black" <tex.noel@gmail.com> wrote in message news:he45pm$1qv$1@fred.mathworks.com... >I have a surface created with TriScatteredInterp, exactly as in the example >here: > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/triscatteredinterpclass.html > > Now i need a 2D line plot of the intersection of a vertical plane with > this surface. This should be a very common problem, just the > depth/elevation profile of a surface along a line, but I cannot find an > example. Hi Noel, When viewed from the Z direction your slice plane is line in the X-Y plane. You just need to create a poly-line in the X-Y plane, compute the corresponding values on the surface and plot them. Here's an example that refers to the same data set; Let's take a line that goes from (-2,-2) to (2,2) in the X-Y plane The poly-line is as follows; xl = (-2:0.25:2)'; yl = (-2:0.25:2)'; % Now evaluate the elevation on the surface zl = F(xl,yl); % Next plot the line on the surface % Due it sampling inaccuracies the line will weave above and below the surface facets. % I will lift it up a tad to make the plot look pretty mesh(qx,qy,qz); zl_lifted = zl + max(zl)*0.05; hold on; plot3(xl,yl,zl_lifted, '-k', 'LineWidth',1.4) hold off How's that? Damian

0 |

11/20/2009 4:22:01 PM

"Noel Black" <tex.noel@gmail.com> wrote in message <he45pm$1qv$1@fred.mathworks.com>... > I have a surface created with TriScatteredInterp, exactly as in the example here: > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/triscatteredinterpclass.html > > Now i need a 2D line plot of the intersection of a vertical plane with this surface. This should be a very common problem, just the depth/elevation profile of a surface along a line, but I cannot find an example. give a look at this: http://www.mathworks.com/matlabcentral/fileexchange/10408-contours-for-triangular-grids http://www.advancedmcode.org/

0 |

12/8/2009 12:24:02 PM