Effacer les filtres
Effacer les filtres

Contour plot along predefined surface

4 vues (au cours des 30 derniers jours)
Floris
Floris le 29 Juin 2011
Commenté : Bruno Luong le 19 Oct 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 commentaire
Bruno Luong
Bruno Luong le 19 Oct 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

Connectez-vous pour commenter.

Réponses (1)

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

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by