Filter löschen
Filter löschen

Contour plot along predefined surface

4 Ansichten (letzte 30 Tage)
Floris
Floris am 29 Jun. 2011
Kommentiert: Bruno Luong am 19 Okt. 2019
Hi,
I have 3D-data, with Z = f(x,y) in numerical format consistent with meshgrid.
I would like to make a contourplot of this surface along a given plane, which is not parallel to the Z-axis. I also want to get the X,Y-values of the intersection of this inclined plane and the surface Z in a matrix as output.
To get the idea, it's basically the same as the function C = contourc(x,y,Z,v) does, but contourc can apparently only handle elevations parallel with the Z-plane.
Of course, I can just rotate all the data so that its new Z-axis is perpendicular to the surface I wish to make the contour projections on (that's quite easy), but it seems too high computational effort.
Any help is appreciated.
  1 Kommentar
Bruno Luong
Bruno Luong am 19 Okt. 2019
"Of course, I can just rotate all the data so that its new Z-axis is perpendicular to the surface I wish to make the contour projections on (that's quite easy), but it seems too high computational effort."
You don't need to rotate the (x,y,z), just substract by the plane equation (a**x+b*y)
zz = z - (a*x+b*y)
do the concour on zz, call it
zz(xx,yy) = cst value
then recover
z = cst + a*xx + b*yy

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Scott Booth
Scott Booth am 19 Okt. 2019
You could loop through the data to collect the points of intersection and then graph them with the plot3 command.

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by