Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Obtaining volume of 3d-shape from crossection points

1 view (last 30 days)
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

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!