Filter löschen
Filter löschen

Trying to calculate the material required to 3Dprint each "donut" layer of a hemisphere. I need to do this by using the spherical cap formula and not volumes of washer shapes.

2 Ansichten (letzte 30 Tage)
ro = 63.95; %outer radius
ri = 63.05; %inner radius
ho = 0.9:0.9:63.9; %vary outer height by a step of 0.9
hi = 0:0.9:63; %vary inner height by a step of 0.9
v = zeros(1,length(ho));
for i = 1:length(ho)
out(i) = 1/3*pi*(ho(i)^2*(3*ro-ho(i))); %calculate outer cap volume
in(i) = 1/3*pi*(hi(i)^2*(3*ri-hi(i))); %calculate inner cap volume
v(i) = out(i) - in(i); %calculate remaining shell volume
end
Lay = diff(v) %calculate washer-shaped layer volume as h0 and hi vary. They are all coming out as constant, though it take less volume to print a layer at the top of a hemisphere vs the bottom

Antworten (1)

Nivedita
Nivedita am 23 Aug. 2023
Hi Adam!
I understand that you are experiencing issues while trying to calculate the volume of a section of a hollow hemisphere.
From my understanding of your implemented code, since "ri" and "ro" are constants and the "hi" and "ho" values are incrementing by the same step value of 0.9, the difference between the consecutive values of "v" will be the same.
Also, since you want to calculate the volume in donut shaped layers, I would suggest varying the radii as well. Moving towards the top of the hemisphere, the radius should be smaller and towards the centre of the hemisphere, the radius should increase.
The code implemented computes the volume in bowl shaped hemispherical layers with varying heights rather than donut or disc shaped layers.
I hope I was able to answer your question.

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by