How to measure surface area in mm^ generated using triangulaiton of a 3D object model by Matlab

I have geneated Cone Model. The cone was generated using radius 78 mm and height 188.4 mm. Using trimesh(), i have triangulated it to measured its suface area. Please help me how to measusre caliberation factor to approxite it surface area or volume. i will be very thankfull for your cooperation and guidance.
Attached are coordinates and the figure of the cone. Thanks for the guidance of KSSV and Uday.
Regards,
bx = Boundary(:,1) ; by = Boundary(:,2) ; bz = Boundary(:,3) ;
T = delaunay(bx, by)
TO = triangulation(T, bx(:),by(:),bz(:));
area = 0;
for i = 1:size(TO.ConnectivityList,1) %the number of rows gives the number of triangles produced
a = TO.Points(TO.ConnectivityList(i,:),:); %this gives the 3 vertices of the ith triangle
if any(a(:,3) > max(bz))
continue;
end
%extract the three vertices
p1 = a(1,:);
p2 = a(2,:);
p3 = a(3,:);
format compact
area = area + 0.5 * norm(cross(p2-p1,p3-p1)); %calculate the area of the small triangle and add with previous result
end
--------------------------------
The above code gives me surface area = 47975.3181943477. This represent pixel, right.
How to measure the real surface area by applying caliberation factor. Please help me how to measure caliberation factor because i am new in this field.
The cone is orginally genereated having radius 78 mm and height 188.4 mm.

12 Commenti

"The above code gives me surface area = 47975.3181943477. This represent pixel, right."
Wrong mm^2.
The surface of the cone (without the base) is
>> h=188.4
h =
188.4000
>> r=78
r =
78
>> A=pi*h*r
A =
4.6166e+04
>>
in you case is approximatively 46166 mm^2 for the h and t values you have provided
Thanks Bruno for guidance.
Firstly, so whatever we measured using matlab (by default) will be mm as a unit.
secondly, how to measure surface area of the cone along with base area too. should i make some changes to the code above. Please guide me. i will be very thankful.
i want you to be my closest frined in my professional life. you have always guided me and supported me in my coding problems. Can we connect by emails please.
Regards,
The area will not be in pixles. The area will be in the units in which your coordinates (bx,by,bz) are. You should be knowing the units of (bx,by,bz).
The default units of bx, by and bz are mm, right.
Its not relevent to this quesion, but need your help. How to open or export text file (e.g. given here in community ) into my workplace matlab. please guide me about the proceedure. thanks.
Which text file? You should read about textscan.
"secondly, how to measure surface area of the cone along with base area too. should i make some changes to the code above"
The bottom base surface is the well known formula
Acircle = pi*r^2
As stated earlier the cone the area (the side) is:
Aside = pi * r * h
If you want both you simply add them, that yields to
Atotal = pi * r * (r + h)
"The default units of bx, by and bz are mm, right. Its not relevent to this quesion"
In contrary it's totally relevant. The unit of the surface you compute depends on the unit of the coordinates. If it's mm then the unit of the area is mm^2.
Yes Bruno, thanks for your great guidance. Please, you are welcome if you want to make changes in the coding. i will be very thankful.
Thanks for information that bx, by an bz are by default in mm units.
Hi Dear Bruno and KSSV, the answers using matlab codes are not matching.
Lets suppose i want to calculate volume:
surface area of cone * height of cone = (slant area + base area )* height = (46166+19708 )*188.4 = 12384312 mm^3
Base area = pi * r^2 = pi * 78^2 = 19708
volume of the cone usign formula = 1/3 * pi * r^2*h = 1,200,324.64 mm^3
Please guide me if i am making any mistake. Regards
I don't know where you get the first formula from. It doesn't look right.
The second formula where I gave you is the correct one.
And beside this is not the question asked, please open the new one if you still have issue with computing the volume.
volume of the cone = surface area * height
Is it not a correct formula?
No. This is the correct formula
V = 1/3 * pi * r^2*h
anything different than that is not.

Accedi per commentare.

Risposte (0)

Categorie

Richiesto:

il 24 Ago 2020

Modificato:

il 26 Ago 2020

Community Treasure Hunt

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

Start Hunting!

Translated by