Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Obtaining volume of 3d-shape from crossection points

1 vue (au cours des 30 derniers jours)
Florian Bendl
Florian Bendl le 1 Mar 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi everyone,
I have the following problem: For a set of given crossection points of a shape in 3d, how can I calculate/approximate the volume of the shape? The shape from which the crossection points are obtained is not necessarily convex, hence convhull volume would be too big. I know the shape looks somewhat ovaloid.
Here are some x y z sample points roughly showing the problem I am dealing with:
intervalPhi = 100;
RadiusA = [5 20 16 20 20 10 3];
RadiusB = [3 10 10 15 12 7 2];
X = [-15 -10 -5 0 5 10 15];
phi = 0:2*pi/intervalPhi:2*pi; phi(end) = [];
x=[]; y=[]; z=[];
for i = 1:length(RadiusA);
rA = RadiusA(i); rB = RadiusB(i);
for p = phi
x(end+1,1) = X(i); y(end+1,1) = rA*cos(p); z(end+1,1) = rB*sin(p);
end
end
plot3(x,y,z,'.'); grid on; xlim([-20 20]); ylim([-20 20]); zlim([-20 20])
Any help is welcome!
Thanks in advance, Florian

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by