フィルターのクリア

Contour plot along predefined surface

4 ビュー (過去 30 日間)
Floris
Floris 2011 年 6 月 29 日
コメント済み: Bruno Luong 2019 年 10 月 19 日
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 件のコメント
Bruno Luong
Bruno Luong 2019 年 10 月 19 日
"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

サインインしてコメントする。

回答 (1 件)

Scott Booth
Scott Booth 2019 年 10 月 19 日
You could loop through the data to collect the points of intersection and then graph them with the plot3 command.

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by