summaryrefslogtreecommitdiff
path: root/projects/projectile/index.html
blob: 3b70817ebb4d095d1a69668113fb888f0d4b0f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<div class="row g-3">
  <div class="col-sm">
    <div class="input-group">
      <div class="input-group-text">\(x_0\)</div>
      <input type="number" class="form-control" v-model.number="x0" @input="origin_redraw">
      <div class="input-group-text">\(m\)</div>
    </div>
  </div>
  <div class="col-sm">
    <div class="input-group">
      <div class="input-group-text">\(y_0\)</div>
      <input type="number" class="form-control" v-model.number="y0" @input="origin_redraw">
      <div class="input-group-text">\(m\)</div>
    </div>
  </div>
  <div class="col-sm">
    <div class="input-group">
      <div class="input-group-text">\(v_{0,x}\)</div>
      <input type="number" class="form-control" v-model.number="vx0" @input="origin_redraw">
      <div class="input-group-text">\(m.s\)</div>
    </div>
  </div>
  <div class="col-sm">
    <div class="input-group">
      <div class="input-group-text">\(v_{0,y}\)</div>
      <input type="number" class="form-control" v-model.number="vy0" @input="origin_redraw">
      <div class="input-group-text">\(m.s\)</div>
    </div>
  </div>
  <div class="col-sm">
    <div class="input-group">
      <div class="input-group-text">\(g\)</div>
      <input type="number" class="form-control" v-model.number="g">
      <div class="input-group-text">\(m.s^{-2}\)</div>
    </div>
  </div>
  <div class="col-auto">
    <button class="btn btn-primary" onClick="refresh()">Restart</button>
  </div>
</div>
<br /><br /><br />

<h3>Projectile Motion</h3>
<p>To determine to position of the projectile we should compute the position vector \(\vec{r}(t)=x(t)\vec{i}+y(t)\vec{j}\).</p>
<h5>\(x(t)\):</h5>
<p>We know from Newton second law that \(\sum \vec{F} = m\times \vec{a}_x = m\times a_x(t)\vec{i}\)</p>
<p>However, the projectile as a constant speed along \(\vec{i}\). Hence, \(a_x(t) = 0 \).</p>
<p>Thus:</p>
\[ v_x(t) = v_{x,0} \]
\[ x(t) = \int_{t_0}^t v_{0,x}dt = v_{0,x}t + C = v_{0,x}t + x_0\]
<h5>\(y(t)\):</h5>
<p>We know from Newton second law that \(\sum \vec{F} = m\times \vec{a}_y = m\times a_y(t)\vec{j}\)</p>
<p>The projectile is under the influence of the gravity that is oriented <em>downward</em>. Hence, \(a_y(t) = -g \).</p>
<p>Thus:</p>
\[ v_y(t) = \int_{t_0}^t a_{y}(t)dt = -gt+C = -gt + v_{0,y}\]
\[ y(t) = \int_{t_0}^t v_y(t)dt = -\frac{1}{2}gt^2 + v_{0,y}t+C=-\frac{1}{2}gt^2 + v_{0,y}t+y_0\]
<h5>\(\vec{r}(t)\):</h5>
<p>Finally knowing \(x(t)\) and \(y(t)\) we have \( \vec{r}(t) = \left(\begin{smallmatrix}x(t)\\y(t)\end{smallmatrix}\right) = \left(\begin{smallmatrix}v_{0,x}t + x_0\\-\frac{1}{2}gt^2 + v_{0,y}t+y_0\end{smallmatrix}\right)\)</p>
<p>We can deduce also that \( \vec{v}(t) = \left(\begin{smallmatrix}v_x(t)\\v_y(t)\end{smallmatrix}\right) = \left(\begin{smallmatrix}v_{0,x}\\-gt+v_{0,y}\end{smallmatrix}\right)\)</p>