
How to rotate an Alpha Shape, or points that defines the edge of a 3D shape?
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Mücahit Gürbüz
il 21 Gen 2016
Commentato: Mücahit Gürbüz
il 21 Gen 2016
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 Commenti
Risposta accettata
Mike Garrity
il 21 Gen 2016
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 Commenti
Mike Garrity
il 21 Gen 2016
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)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Bounding Regions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!