Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Obtaining volume of 3d-shape from crossection points

1 visualizzazione (ultimi 30 giorni)
Florian Bendl
Florian Bendl il 1 Mar 2016
Chiuso: MATLAB Answer Bot il 20 Ago 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

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by