trap and sons
Simulador final: choque perfectamente inelástico.
Conservacion de la cantidad de movimiento.
SHOOT SIMULATOR
[Wolfram Mathematica 8.0]
Manipulate[
With[{\[Theta] = ArcTan[(m2 0.00001)/(m1 v1)], cd = .75, sf = 20},
With[{vf = (m1 v1)/((m1 + m2) Cos[\[Theta]])},
Graphics[{Gray, Rectangle[{-5, -5}, {5, -2}],
White, Rectangle[{-5, -2}, {3, 3}],
Darker[Brown], Rectangle[{-5, -5}, {-4.5, 3}],
Darker[Brown], Rectangle[{-5, 3}, {3, 2}],
Darker[Brown], Rectangle[{3, 3}, {2, -5}],
Darker[Brown], Rectangle[{-5, -5}, {3, -4.5}],
Thickness[0.001], Black, Line[{{-4.5, -2}, {2, -2}}],
Black,
Disk[collpos + {-v1/sf cd + If[ t < cd, v1/sf t, v1/sf cd], 0} +
If[t > cd, vf/sf (t - cd) { Cos[\[Theta]], Sin[\[Theta]]}, 0], 0.1],
RGBColor[.6, .73, .36],
Rotate[Rectangle[
collpos + {-.17, .6 + If[t < cd, 0, 0]} +
If[t > cd, vf/sf (t - cd) { Cos[\[Theta]], Sin[\[Theta]]}, 0],
collpos + {.5, 0 + If[t < cd, 0, 0]} +
If[t > cd, vf/sf (t - cd) { Cos[\[Theta]], Sin[\[Theta]]}, 0]],
If[t > cd, 2 \[Pi]/2 - (\[Pi]/2 - \[Theta])/2, 0]],
Black, Rectangle[{-4.5, 0}, {-3.5, 0.3}],
Rectangle[{-4.5, -0.3}, {-4.2, 0}],
Rectangle[{-4.1, -0.1}, {-4, 0}],
Line[{{-4.2, -0.2}, {-3.9, -0.2}, {-3.9, 0}}],
Dashed, Thickness[.001], Black,
Line[{{collpos[[1]] - v1/sf cd, collpos[[2]]}, collpos}],
White,
Style[Text[
Column[{Row[{"\!\(\*SubscriptBox[\(v\), \(f\)]\)", (
m1 v1)/((m1 + m2) Cos[\[Theta]]) "m/s"}, "="]}], {-3., -3.}], 16],
Dashing[None]
}, PlotRangePadding -> 0, ImageSize -> {350, 350},
PlotRange -> {{-5, 2.5}, {-5, 2.5}}]]],
{t, 0., 1.1, .01, ImageSize -> Small, Appearance -> "Labeled"},
(*{{\[Theta], 2\[Pi], "\[Theta]"},\[Pi], 2\[Pi], .1, \
ImageSize->Small,Appearance->"Labeled"}*)
{{m1, 1000., "\!\(\*SubscriptBox[\(m\), \(1\)]\)"}, 0.00001, 1400., .1,
ImageSize -> Small,
Appearance -> "Labeled"}, {{m2, 1000.,
"\!\(\*SubscriptBox[\(m\), \(2\)]\)"}, 0.00001, 1800., .1,
ImageSize -> Small,
Appearance -> "Labeled"}, {{v1, 96., "\!\(\*SubscriptBox[\(v\), \(1\)]\)"},
20., 100., .1, ImageSize -> Small, Appearance -> "Labeled"},
{{collpos, {-0.2, 0.1}}, {-.7, -.7}, {.7, .7}},
ControlPlacement -> Left]
Manipulate[With[{\[Theta]$ = ArcTan[m2*(0.00001/(m1*v1))], cd$ = 0.75, sf$ = \
20},
With[{vf$ = m1*(v1/((m1 + m2)*Cos[\[Theta]$]))},
Graphics[{Gray, Rectangle[{-5, -5}, {5, -2}], White,
Rectangle[{-5, -2}, {3, 3}], Darker[Brown], Rectangle[{-5, -5},
{-4.5, 3}], Darker[Brown], Rectangle[{-5, 3}, {3, 2}], Darker[Brown],
Rectangle[{3, 3}, {2, -5}], Darker[Brown], Rectangle[{-5, -5},
{3, -4.5}], Thickness[0.001], Black, Line[{{-4.5, -2}, {2, -2}}],
Black, Disk[collpos + {(-v1/sf$)*cd$ + If[t < cd$, (v1/sf$)*t,
(v1/sf$)*cd$], 0} + If[t > cd$, ((vf$/sf$)*(t - cd$))*
{Cos[\[Theta]$], Sin[\[Theta]$]}, 0], 0.1], RGBColor[0.6, 0.73, \
0.36],
Rotate[Rectangle[collpos + {-0.17, 0.6 + If[t < cd$, 0, 0]} +
If[t > cd$, ((vf$/sf$)*(t - cd$))*{Cos[\[Theta]$], Sin[\[Theta]$]}, \
0],
collpos + {0.5, 0 + If[t < cd$, 0, 0]} + If[t > cd$,
((vf$/sf$)*(t - cd$))*{Cos[\[Theta]$], Sin[\[Theta]$]}, 0]],
If[t > cd$, 2*(Pi/2) - (Pi/2 - \[Theta]$)/2, 0]], Black,
Rectangle[{-4.5, 0}, {-3.5, 0.3}], Rectangle[{-4.5, -0.3}, {-4.2, 0}],
Rectangle[{-4.1, -0.1}, {-4, 0}], Line[{{-4.2, -0.2}, {-3.9, -0.2},
{-3.9, 0}}], Dashed, Thickness[0.001], Black,
Line[{{collpos[[1]] - (v1/sf$)*cd$, collpos[[2]]}, collpos}], White,
Style[Text[Column[{Row[{"\!\(\*SubscriptBox[\(v\), \(f\)]\)",
(m1*(v1/((m1 + m2)*Cos[\[Theta]$])))*"m/s"}, "="]}], {-3., -3.}], \
16],
Dashing[None]}, PlotRangePadding -> 0, ImageSize -> {350, 350},
PlotRange -> {{-5, 2.5}, {-5, 2.5}}]]], {{t, 0.18}, 0., 1.1, 0.01,
ImageSize -> Small, Appearance -> "Labeled"},
{{m1, 1000., "\!\(\*SubscriptBox[\(m\), \(1\)]\)"}, 0.00001, 1400., 0.1,
ImageSize -> Small, Appearance -> "Labeled"},
{{m2, 1000., "\!\(\*SubscriptBox[\(m\), \(2\)]\)"}, 0.00001, 1800., 0.1,
ImageSize -> Small, Appearance -> "Labeled"},
{{v1, 96., "\!\(\*SubscriptBox[\(v\), \(1\)]\)"}, 20., 100., 0.1,
ImageSize -> Small, Appearance -> "Labeled"},
{{collpos, {-0.2, 0.1}}, {-0.7, -0.7}, {0.7, 0.7}},
ControlPlacement -> Left]