# How I can control the speed with which the cone is filled? [closed]

My idea is: By calculating the speed ie VelVol = v2 * t; where v2 is the volume of the second cone (the amount of "water" that is inserted into the cone) You can see that I have 4 slider (The first two control the dimensions of the cone to fill up the last 2 sliders are: One volume and speed another time)

Clear[f, v, r1, v1, h1, v2, r2, h2, t];
Manipulate[
H[h1_, r1_, v_] := CubeRoot[(3 v)*(Power[h1, 2])/N[(Power[r1, 2])* Pi]];
R[r1_, h1_] := N[r1 * H[h1, r1, v]/h1];
v1[h1_, r1_] := (Pi/3)*Power[r1, 2]*h1;
v2 = N[Pi/3]*Power[R[r1, h1], 2]*H[h1, r1, v];
VelVol = t/v2;
Graphics3D[
{
LightBlue, Opacity[.5],
Cone[{{0, 0, h1}, {0, 0, 0}}, r1],
{Blue, Opacity[0.8],
Cone[{{0, 0, H[h1, r1, v]}, {0, 0, 0}}, R[r1, h1]]}
}, Boxed -> True, Axes -> {True, True, True},
ViewPoint -> {0.1, 10, 2},
PlotRange -> {{-5, 5}, {-5, 5}, {0, 5}}], {{r1, 1, "Radio Mayor"},
0, 10}, {{h1, 1, "Altura Mayor"}, 0,
10}, {{VelVol, 1, "Velocidad del volumen"}, 0,
10}, {{t, 1, "Tiempo"}, 0, 10}]
Contribution @Belisarius


I really need your help because I can not move more

-----------------------------------------------------------------------------

I try to add the label that appears as the volume is changing as time goes by but the label is not updated, what can I do to be updated as the slider is moved?

H[h1_, r1_, v_] := CubeRoot[(3 v)*h1^2/(r1^2*Pi)];
R[r1_, h1_, v_] := r1*H[h1, r1, v]/h1;
v2 := N[Pi/3]*Power[R[r, h, t], 2]*H[h, r, t];

Manipulate[
Graphics3D[{LightBlue, Opacity[.5],
Cone[{{0, 0, h}, {0, 0, 0}}, r], {Blue, Opacity[0.8],
Cone[{{0, 0, H[h, r, t]}, {0, 0, 0}}, R[r, h, t]]}},
Boxed -> True, Axes -> {True, True, True},
ViewPoint -> {0.1, 10, 2}, PlotRange -> {{-5, 5}, {-5, 5}, {0, 5}},
PlotLabel ->  Style[Panel[v2], White, Background -> Lighter[Gray]]],
{{r, 4, "Radio Mayor"}, 0, 10}, {{h, 4, "Altura Mayor"}, 0,
10}, {{t, 0, "Tiempo"}, 0, 60}]

Contribution @bill s


You're right and is updated but what gives me the value of time and not the volume, how I can fix this problem if I'm supposed to call the sending function v2 (which is the volume of liquid)?

-

## closed as unclear what you're asking by Yves Klett, Michael E2, Dr. belisarius, bobthechemist, Sjoerd C. de VriesFeb 21 '14 at 21:43

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

You don't really ask any question? – bill s Feb 20 '14 at 18:56
My question is: How can I make the cone is filled to a certain speed, ie you establish the values ​​of height and radius of the cone you want to fill, but also want to set the speed at which the cone is filled? – Starlight Feb 20 '14 at 19:09
The truth and try many things but I can not get results, please help! – Starlight Feb 20 '14 at 19:09

I have cleaned up your code by removing excess variables and calculations, and moved the function definitions outside the manipulate. In this version you can click on the little "plus" to the right of the tiempo slider and set it in motion with the "play" button, you can speed it up and slow it down with the double uparrows and double downarrows. You will need to fix the limits on the tiempo range (currently 60) so that it changes appropriately with the size of the parabolas.

H[h1_, r1_, v_] := CubeRoot[(3 v)*h1^2/(r1^2*Pi)];
R[r1_, h1_, v_] := r1*H[h1, r1, v]/h1;
Manipulate[Graphics3D[{LightBlue, Opacity[.5],
Cone[{{0, 0, h}, {0, 0, 0}}, r], {Blue, Opacity[0.8],
Cone[{{0, 0, H[h, r, t]}, {0, 0, 0}}, R[r, h, t]]}},
Boxed -> True, Axes -> {True, True, True}, ViewPoint -> {0.1, 10, 2},
PlotRange -> {{-5, 5}, {-5, 5}, {0, 5}}], {{r, 4, "Radio Mayor"}, 0, 10},
{{h, 4, "Altura Mayor"}, 0, 10}, {{t, 0, "Tiempo"}, 0, 60}]


Here it is as an animation:

r = 4; h = 4;
gif =  Table[Graphics3D[{LightBlue, Opacity[.5],
Cone[{{0, 0, h}, {0, 0, 0}}, r], {Blue, Opacity[0.8],
Cone[{{0, 0, H[h, r, t]}, {0, 0, 0}}, R[r, h, t]]}},
Boxed -> True, Axes -> {True, True, True},
ViewPoint -> {0.1, 10, 2},
PlotRange -> {{-5, 5}, {-5, 5}, {0, 5}}], {t, 0, 60, 1}];
Export["anim.gif", gif]


In the animation, you can change the speed either by changing the rate at which the .gif is playing or by changing the increment of the t variable.

-
Thank accommodate because if so time determines the amount of "liquid",how can I print to this graph the volume obtained? – Starlight Feb 23 '14 at 3:19
Make the v2 a function v2[r_, h_, t_] := N[Pi/3]*Power[R[r, h, t], 2]*H[h, r, t]; and then call it as v2[r,h,t]. – bill s Feb 23 '14 at 3:53
I did as you suggested me but I mark errors – Starlight Feb 23 '14 at 4:00
Am I supposed to read your mind? What errrors? (Because I get none). So try quitting the kernel and try again. – bill s Feb 23 '14 at 4:04
You're right and is updated but what gives me the value of time and not the volume, how I can fix this problem if I'm supposed to call the sending function v2 (which is the volume of liquid)? – Starlight Feb 23 '14 at 4:28