rotate 3D data

5 ビュー (過去 30 日間)
Lotte Piek
Lotte Piek 2023 年 10 月 18 日
コメント済み: Star Strider 2023 年 10 月 18 日
I have a geometry that consists of contours of xyz data points, I want to allign it in such a way that the inlet(left side) is perpendicular to the z axis so that the lenght of the geometry is along the z-axis. Can anybody help?
Thanks!
  2 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 10 月 18 日
How is your question related to MATLAB?
Do you attain the figure by MATLAB code? If so, then provide the code and relevant data used.
Lotte Piek
Lotte Piek 2023 年 10 月 18 日
編集済み: Lotte Piek 2023 年 10 月 18 日
for i=101:171;
plot3(dab.SegmentInfo(i).branch1(:,1), dab.SegmentInfo(i).branch1(:,2),dab.SegmentInfo(i).branch1(:,3)); hold on; --> blue in image
plot3(dab.SegmentInfo(i).branch2(:,1), dab.SegmentInfo(i).branch2(:,2),dab.SegmentInfo(i).branch2(:,3)); hold on; --> green in image
end;
for i = 173:435
plot3(dab.SegmentInfo(i).main(:,1), dab.SegmentInfo(i).main(:,2),dab.SegmentInfo(i).main(:,3)); --> black in image
end
Colours in the figure are after the line, so the data consists of three parts and these consist of countours (xyz values for the points in the contours)

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

採用された回答

Star Strider
Star Strider 2023 年 10 月 18 日
Use the rotate function. It will likely require a bit of experimenting to get it the way you want it.
Example —
imshow(imread('ask.png'))
title('Question Image')
x = 0:0.01:2*pi;
y = sin(8*x);
z = cos(8*x);
figure
hp = plot3(x, y, z);
grid on
xlabel('x')
ylabel('y')
zlabel('z')
axis('square')
title('Original')
figure
hp = plot3(x, y, z);
grid on
xlabel('x')
ylabel('y')
zlabel('z')
axis('square')
rotate(hp,[0 1 0],90)
title('Rotated')
.
  2 件のコメント
Lotte Piek
Lotte Piek 2023 年 10 月 18 日
thanks, will give it a try!
Star Strider
Star Strider 2023 年 10 月 18 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by