Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Manipulate[
- Row[{
- Show[Graphics[{
- ColorData["DarkBands"][0.3],
- Rotate[Rectangle[{-4, 0.5}, {0, -0.5}], Pi/6, {0, 0}],
- PointSize[Medium],
- Blue, Disk[target[ta], 0.4],
- Darker@Red, Point[bullet[ta]],
- Black, Dashed, Line[{{0, 0}, 2 target[0]}]
- }, PlotRange -> {{-5, 15}, {-3, 10}}],
- ParametricPlot[bullet[t], {t, 0, 14}, PlotStyle -> Black]
- , ImageSize -> {300, 200}
- ],
- Show[Graphics[{
- ColorData["DarkBands"][0.3],
- Rotate[
- Rectangle[{-4, 0.5} + {0, 1/2 g ta^2}, {0, -0.5} + {0,
- 1/2 g ta^2}], Pi/6, {0, 0} + {0, 1/2 g ta^2}],
- PointSize[Medium],
- Blue, Disk[target[ta] + {0, 1/2 g ta^2}, 0.4],
- Darker@Red, Point[bullet[ta] + {0, 1/2 g ta^2}],
- Black, Line[{{0, 0}, 2 target[0]}]
- }, PlotRange -> {{-5, 15}, {-3, 10}}],
- ParametricPlot[bullet[t] + {0, 1/2 g ta^2}, {t, 0, 14},
- PlotStyle -> Directive[Dashed, Black]]
- , ImageSize -> {300, 200}]
- }]
- , {ta, 0, 14},
- Initialization :> (
- g = 0.1;
- bullet[t_] := {Cos[Pi/6], Sin[Pi/6]} t - {0, 0.5 g t^2};
- target[t_] := 12 {Cos[Pi/6], Sin[Pi/6]} - {0, 0.5 g t^2};
- )]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement