I have a cone. I measured its volume using code below. very thankful to Mr. Bruno Luong for his guidance. My aim is to divide this cone into number of layers using certians thickness, then i want to measure the volume of each layer (i.e. slice). For example, using thickness of layers = 10, i will get certain numer of layers (i.e. slices). How can we perform such operations using matlab. Thanks in advance for all cooperation.
Attached is file for coordinates of the cone using following cone parameters.
% Cone parameters
% x, y, and z coordinates are given in attached file.
R = 78; % radius of the cone
h = 188.4; % height of the cone.
N = 20000; % points used to generate the cone.
tri = delaunay(x,y,z);trisurf(tri,x,y,z)% indices of triangle
i1 = tri(:,1);i2 = tri(:,2);i3 = tri(:,3);i4 = tri(:,4);%% Volume by summing tetrahedron
v1 = [x(i1)-x(i2) y(i1)-y(i2) z(i1)-z(i2)];v2 = [x(i1)-x(i3) y(i1)-y(i3) z(i1)-z(i3)];v3 = [x(i1)-x(i4) y(i1)-y(i4) z(i1)-z(i4)];A = 1/2*cross(v1,v2,2); % surface of a triangle
V = 1/3*dot(A,v3,2); % volume of a tetrahedron
format longGV = sum(abs(V))
Best Answer