
How to rotate an Alpha Shape, or points that defines the edge of a 3D shape?
16 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am trying to rotate a 3-D surface which composed of 1000 points defined in space. I turned these points to a surface by using alphashape function.
I tried to rotate with "rotate" function but, I got type error;
Error in rotate (line 59)
t = get(h(i),'type');
Can you suggest me a solution?
For additional information, please ask it.
Thanks in advance, Mücahit
0 件のコメント
採用された回答
Mike Garrity
2016 年 1 月 21 日
Could you post your code?
Here's a modified version of one of the examples:
[x1, y1, z1] = sphere(24);
x1 = x1(:);
y1 = y1(:);
z1 = z1(:);
x2 = x1+5;
P = [x1 y1 z1; x2 y1 z1];
P = unique(P,'rows');
shp = alphaShape(P,1)
h = plot(shp);
axis vis3d
for i=1:12
rotate(h,[1 1 1],30)
pause(.25)
end

3 件のコメント
Mike Garrity
2016 年 1 月 21 日
Ah, the rotate function wants the handle of the graphics object, not the alphaShape. The graphics object is created by the plot function. So you need something like:
h = plot(as_rock,'FaceColor', ...
...
rotate(h,direction,25,origin)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Bounding Regions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!