Projectile
Q. A body is thrown at at where gravity is . Where does it land, how high does it gom/s, and how long is it in the air?
Inputs
Outputs
range40.77 m
peak10.19 m
time2.88 s
How it's solved
Solved with Projectile
Given
- m/s from “how high does it go”
- , , yours to vary
Assumed
- m
- m
- m
Find , , .
Working
- parts of a velocity(body, start of up, y)
- m/s
- falling freely(up, y)
- m/s²
- velocity after a time(up, y)
- s
- position after a time(up, y)
- m
- falling freely(down, y)
- m/s²
- position after a time(down, y)
- s
- parts of a velocity(body, start of up, x)
- m/s
- falling freely(up, x)
- m/s²
- position after a time(up, x)
- m
- velocity after a time(up, x)
- m/s
- falling freely(down, x)
- m/s²
- position after a time(down, x)
- m
- velocity after a time(down, y)
- m/s
- falling freely(flying, y)
- m/s²
- velocity after a time(flying, y)
- s
Conclusion
Wherever the throw sent it. Nothing touches it after it leaves the hand, so the angle it left at, the speed it left at, and how hard the world pulls decide the whole flight.
The web of concepts
given read from the words equation asked
The Ruby that solves it
The question and its solution are small Ruby files. The engine runs them.
1require_relative "../physics"23question :projectile do4 describes "A body is thrown at %{speed} at %{angle} where gravity is %{gravity}. %{range}, %{peak}, and %{time}?"5 given :angle6 given :speed7 given :gravity8 asks range: "Where does it land", peak: "how high does it go", time: "how long is it in the air"9end1require_relative "../questions/projectile"2require_relative "../science/motion_in_a_plane/projectile"34solve :projectile, using: Projectile do5 objects :body6 axes :x, :y7 body.goes(:up)8 body.goes(:down, after: up)9 body.goes(:flying, made_of: [ up, down ])10 take angle: body.direction(at: flying.start), speed: body.speed(at: flying.start), gravity: g,11 range: body.position(at: flying.end, along: x), peak: body.position(at: up.end, along: y), time: flying.time_taken12 assume body.position(at: flying.start, along: x) => "0 m", body.position(at: flying.start, along: y) => "0 m",13 body.position(at: flying.end, along: y) => "0 m"14 deduce_from "how high does it go", body.velocity(at: up.end, along: y) => "0 m/s"15 find_value :range16 find_value :peak17 find_value :time1819 conclusion "Wherever the throw sent it. Nothing touches it after it leaves the hand, so the angle it left at, the speed it left at, and how hard the world pulls decide the whole flight."20endplayground.rb
1require_relative "../solutions/projectile"2require_relative "../science/motion_in_a_plane/gravity"3require_relative "../pictures/in_view"4require_relative "../pictures/flight"56play_with :projectile do7 title "Projectile"89 input :angle, default: 45.deg, step: 5.deg10 input :speed, 10.0..100.0, in: "m/s", step: 10.0, default: 20.01112 input :world, GRAVITY, default: "earth"13 input :in_view, IN_VIEW1415 input(:gravity) { world }1617 output :range, in: "m"18 output :peak, in: "m"19 output :time, in: "s"2021 draw Flight::Picture do22 ground23 flight leaving_at: :angle24 reach "range", :range25 apex "peak", :peak26 end27endThe laws it drew on
| quantity | written | units | within | from |
|---|---|---|---|---|
| volume | — | — | Vectors | |
| mass | — | — | Vectors | |
| speed | — | — | Vectors | |
| density | — | — | Vectors | |
| number of moles | — | — | Vectors | |
| angular frequency | — | — | Vectors | |
| work | — | — | Vectors | |
| current | — | — | Vectors | |
| temperature | — | — | Vectors | |
| pressure | — | — | Vectors | |
| time | s | 0 … 1e+05 | Vectors | |
| power | — | — | Vectors | |
| total path length | — | — | Vectors | |
| energy | — | — | Vectors | |
| gravitational potential | — | — | Vectors | |
| coefficient of friction | — | — | Vectors | |
| charge | — | — | Vectors | |
| acceleration | m/s² | — | Vectors | |
| velocity | m/s | — | Vectors | |
| displacement | m | — | Vectors | |
| angular velocity | — | — | Vectors | |
| force | — | — | Vectors | |
| angular momentum | — | — | Vectors | |
| linear momentum | — | — | Vectors | |
| electric field | — | — | Vectors | |
| average velocity | m/s | — | Vectors | |
| magnetic moment | — | — | Vectors | |
| relative velocity | — | — | Vectors | |
| impulse | — | — | Vectors | |
| first vector | — | 0 … ∞ | Vectors | |
| second vector | — | 0 … ∞ | Vectors | |
| angle between | — | 0 … 3.142 | Vectors | |
| resultant | — | 0 … ∞ | Vectors | |
| resultant direction | — | 0 … 3.142 | Vectors | |
| direction | — | -3.142 … 3.142 | Vectors | |
| x component | — | — | Vectors | |
| y component | — | — | Vectors | |
| position | m | — | Velocity | |
| path length | m | — | Velocity | |
| time taken | s | 0 … 1e+05 | Velocity | |
| average speed | m/s | — | Velocity | |
| starting position | m | — | Velocity | |
| final position | m | — | Velocity | |
| change of velocity | m/s | — | Acceleration | |
| average acceleration | m/s² | — | Acceleration | |
| starting velocity | m/s | — | Acceleration | |
| final velocity | m/s | — | Acceleration | |
| gravity | m/s² | — | UniformAcceleration | |
| displacement of body during up along x | m | — | ||
| position of body at end of up along x | m | — | ||
| position of body at start of up along x | m | — | ||
| displacement of body during up along y | m | — | ||
| position of body at end of up along y | m | — | ||
| position of body at start of up along y | m | — | ||
| displacement of body during down along x | m | — | ||
| position of body at end of down along x | m | — | ||
| displacement of body during down along y | m | — | ||
| position of body at end of down along y | m | — | ||
| displacement of body during flying along x | m | — | ||
| displacement of body during flying along y | m | — | ||
| average velocity of body during up along x | m/s | — | ||
| time taken of up | s | 0 … 1e+05 | ||
| average velocity of body during up along y | m/s | — | ||
| average velocity of body during down along x | m/s | — | ||
| time taken of down | s | 0 … 1e+05 | ||
| average velocity of body during down along y | m/s | — | ||
| average velocity of body during flying along x | m/s | — | ||
| time taken of flying | s | 0 … 1e+05 | ||
| average velocity of body during flying along y | m/s | — | ||
| average speed of body during up | m/s | — | ||
| path length of body during up | m | — | ||
| average speed of body during down | m/s | — | ||
| path length of body during down | m | — | ||
| average speed of body during flying | m/s | — | ||
| path length of body during flying | m | — | ||
| change of velocity of body during up along x | m/s | — | ||
| velocity of body at end of up from ground along x | m/s | — | ||
| velocity of body at start of up from ground along x | m/s | — | ||
| change of velocity of body during up along y | m/s | — | ||
| velocity of body at end of up from ground along y | m/s | — | ||
| velocity of body at start of up from ground along y | m/s | — | ||
| change of velocity of body during down along x | m/s | — | ||
| velocity of body at end of down from ground along x | m/s | — | ||
| change of velocity of body during down along y | m/s | — | ||
| velocity of body at end of down from ground along y | m/s | — | ||
| change of velocity of body during flying along x | m/s | — | ||
| change of velocity of body during flying along y | m/s | — | ||
| average acceleration of body during up along x | m/s² | — | ||
| average acceleration of body during up along y | m/s² | — | ||
| average acceleration of body during down along x | m/s² | — | ||
| average acceleration of body during down along y | m/s² | — | ||
| average acceleration of body during flying along x | m/s² | — | ||
| average acceleration of body during flying along y | m/s² | — | ||
| acceleration of body during up along x | m/s² | — | ||
| acceleration of body during up along y | m/s² | — | ||
| acceleration of body during down along x | m/s² | — | ||
| acceleration of body during down along y | m/s² | — | ||
| acceleration of body during flying along x | m/s² | — | ||
| acceleration of body during flying along y | m/s² | — | ||
| acceleration of body during up | m/s² | — | ||
| acceleration of body during flying | m/s² | — | ||
| acceleration of body during down | m/s² | — | ||
| velocity of ground at start of up from ground along x | m/s | — | ||
| velocity of ground at start of up from ground | m/s | — | ||
| direction of ground at start of up from ground | — | -3.142 … 3.142 | ||
| velocity of ground at start of up from ground along y | m/s | — | ||
| velocity of ground at end of up from ground along x | m/s | — | ||
| velocity of ground at end of up from ground | m/s | — | ||
| direction of ground at end of up from ground | — | -3.142 … 3.142 | ||
| velocity of ground at end of up from ground along y | m/s | — | ||
| velocity of ground at end of down from ground along x | m/s | — | ||
| velocity of ground at end of down from ground | m/s | — | ||
| direction of ground at end of down from ground | — | -3.142 … 3.142 | ||
| velocity of ground at end of down from ground along y | m/s | — | ||
| velocity of body at start of up from ground | m/s | — | ||
| direction of body at start of up from ground | — | -3.142 … 3.142 | ||
| velocity of body at end of up from ground | m/s | — | ||
| direction of body at end of up from ground | — | -3.142 … 3.142 | ||
| velocity of body at end of down from ground | m/s | — | ||
| direction of body at end of down from ground | — | -3.142 … 3.142 | ||
| displacement of body during up | m | — | ||
| position of body at end of up | m | — | ||
| position of body at start of up | m | — | ||
| displacement of body during down | m | — | ||
| position of body at end of down | m | — | ||
| displacement of body during flying | m | — | ||
| average velocity of body during up | m/s | — | ||
| average velocity of body during down | m/s | — | ||
| average velocity of body during flying | m/s | — | ||
| change of velocity of body during up | m/s | — | ||
| change of velocity of body during down | m/s | — | ||
| change of velocity of body during flying | m/s | — | ||
| average acceleration of body during up | m/s² | — | ||
| average acceleration of body during down | m/s² | — | ||
| average acceleration of body during flying | m/s² | — |