Nonrecursive Movement Formulas: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
mNo edit summary
mNo edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<!--T:1-->
__NOTOC__
__NOTOC__
Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive formulas to calculate simple but useful results, such as the height of the player on any given tick, or the distance of a jump in terms of the initial speed and duration.
Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive functions to calculate simple but useful results, such as the height of the player on any given tick, or the distance of a jump in terms of the initial speed and duration.

Numeric approximations are given with 6 digits of precision.





<!--T:2-->
'''Definitions:'''
'''Definitions:'''


<!--T:3-->
* <math display="inline">v_0</math> is the player's initial speed (speed on <math>t_0</math>, before jumping)
* <math display="inline">v_0</math> is the player's initial speed (speed on <math>t_0</math>, before jumping)
* <math display="inline">t</math> is the number of ticks considered (ex: t=12 on flat ground, see '''Jump Duration''')
* <math display="inline">t</math> is the number of ticks considered (ex: the jump duration on flat ground is t=12, see [[Special:MyLanguage/Tiers|Tiers]])
*<math display="inline">J</math> is the "jump bonus" (0.3274 for sprintjump, 0.291924 for strafed sprintjump, 0.1 for 45° no-sprint jump...)
* <math display="inline">J</math> is the "jump bonus" (0.3274 for sprintjump, 0.291924 for strafed sprintjump, 0.1 for 45° no-sprint jump...)
*<math display="inline">M</math> is the movement multiplier after jumping (1.3 for 45° sprint, 1.274 for normal sprint, 1.0 for no-sprint 45°...)
* <math display="inline">M</math> is the movement multiplier after jumping (1.3 for 45° sprint, 1.274 for normal sprint, 1.0 for no-sprint 45°...)





=== Vertical Movement (jump) [1.8] ===
== Vertical Movement (jump) [1.8] == <!--T:4-->

<!--T:5-->
Vertical speed after jumping (<math>t \geq 6</math>)
Vertical speed after jumping (<math>t \geq 6</math>)

{| class="wikitable"
<!--T:6-->
!<math display="inline">\textrm{V}_Y(t) = 4 \times 0.98^{t-5} - 3.92</math>
:<math display="inline">\textrm{V}_Y(t) = 4 \times 0.98^{t-5} - 3.92</math>
|}


<!--T:7-->
Relative height after jumping (<math>t \geq 6</math>)
Relative height after jumping (<math>t \geq 6</math>)
{| class="wikitable"
!<math display="inline">\textrm{Y}_{rel}(t) = \underset{\textrm{jump peak}}{\underbrace{197.4 - 217 \times 0.98^5}} + 200 (0.98-0.98^{t-4}) - 3.92 (t-5)</math>
|-
|num. approx: <math>\textrm{Y}_{rel}(t) \approx 216.849187 - 216.833157 \times 0.98^t - 3.92t</math>
|}


<!--T:8-->
:<math display="inline">\textrm{Y}_{rel}(t) = \underset{\textrm{jump peak}}{\underbrace{197.4 - 217 \times 0.98^5}} + 200 (0.98-0.98^{t-4}) - 3.92 (t-5)</math>


<!--T:9-->
For <math display="inline">t<6</math>, see below.
For <math display="inline">t<6</math>, see below.





=== Vertical Movement (jump) [1.9+] ===
== Vertical Movement (jump) [1.9+] == <!--T:10-->

<!--T:11-->
Vertical speed after jumping (<math>t \geq 1</math>)
Vertical speed after jumping (<math>t \geq 1</math>)
{| class="wikitable"
!<math display="inline">\textrm{V}_Y(t) = 0.42 \times 0.98^{t-1} + 4 \times 0.98^t - 3.92</math>
|-
|num. approx: <math>\textrm{V}_Y(t) \approx 4.428571 \times 0.98^t - 3.92</math>
|}


<!--T:12-->
:<math display="inline">\textrm{V}_Y(t) = 0.42 \times 0.98^{t-1} + 4 \times 0.98^t - 3.92</math>


<!--T:13-->
Relative height after jumping (<math>t \geq 0</math>)
Relative height after jumping (<math>t \geq 0</math>)

{| class="wikitable"
<!--T:14-->
!<math display="inline">\textrm{Y}_{rel}(t) = 217 \times (1 - 0.98^t) - 3.92 t</math>
:<math display="inline">\textrm{Y}_{rel}(t) = 217 \times (1 - 0.98^t) - 3.92 t</math>
|}







== Horizontal Movement (instant jump) == <!--T:15-->


<!--T:16-->
=== Horizontal Movement (instant jump) ===
Assuming the player was airborne before jumping.
Assuming the player was airborne before jumping.


<!--T:17-->
Horizontal speed after sprintjumping (<math>t \geq 2</math>)
Horizontal speed after sprintjumping (<math>t \geq 2</math>)

{| class="wikitable"
<!--T:18-->
!<math display="inline">\textrm{V}_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>
:<math display="inline">\textrm{V}_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>
|-

|45° sprint: <math>\textrm{V}_H(v_0,t) \approx 0.288889 + 0.6 \times 0.91^t \times \left ( v_0 - 0.169320 \right )</math>

|-
<!--T:19-->
|reg. sprint: <math display="inline">\textrm{V}_H(v_0,t) \approx 0.283111 + 0.6 \times 0.91^t \times \left ( v_0 - 0.158738 \right )</math>
|}
Sprintjump distance (<math>t \geq 2</math>)
Sprintjump distance (<math>t \geq 2</math>)
{| class="wikitable"
!<math display="inline">\textrm{Dist}(v_0,t) = 1.91 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>
|-
|45° sprint: <math display="inline">\textrm{Dist}(v_0,t) \approx 7.430667 v_0 + 0.288889 t -1.185138 - 6.666667 \times 0.91^t \left ( v_0 - 0.169320 \right )</math>
|-
|reg. sprint: <math display="inline">\textrm{Dist}(v_0,t) \approx 7.430667 v_0 + 0.283111 t -1.115163 - 6.666667 \times 0.91^t \left ( v_0 - 0.158738 \right )</math>
|}


<!--T:20-->
:<math display="inline">\textrm{Dist}(v_0,t) = 1.91 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>


<!--T:21-->
'''Note:''' These formulas are accurate for most values of <math>v_0</math>, but some negative values can wind up activating the speed threshold and reset the player's speed at some point, thus rendering these formulas inaccurate.
'''Note:''' These formulas are accurate for most values of <math>v_0</math>, but some negative values can wind up activating the speed threshold and reset the player's speed at some point, thus rendering these formulas inaccurate.





=== Horizontal Movement (delayed jump) ===
== Horizontal Movement (delayed jump) == <!--T:22-->

<!--T:23-->
Assuming the player is on ground before jumping (at least 1 tick since landing).
Assuming the player is on ground before jumping (at least 1 tick since landing).


<!--T:24-->
Horizontal speed after sprintjumping (<math>t \geq 2</math>)
Horizontal speed after sprintjumping (<math>t \geq 2</math>)

{| class="wikitable"
<!--T:25-->
!<math display="inline">\textrm{V}^*_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( 0.6 v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>
:<math display="inline">\textrm{V}^*_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( 0.6 v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>
|-

|45° sprint: <math>\textrm{V}^*_H(v_0,t) \approx 0.288889 + 0.36 \times 0.91^t \times \left ( v_0 -0.282201 \right )</math>

|-
<!--T:26-->
|reg. sprint: <math display="inline">\textrm{V}^*_H(v_0,t) \approx 0.283111 + 0.36 \times 0.91^t \times \left ( v_0 - 0.264563 \right )</math>
|}
Sprintjump distance (<math>t \geq 2</math>)
Sprintjump distance (<math>t \geq 2</math>)
{| class="wikitable"
!<math display="inline">\textrm{Dist}^*(v_0,t) = 1.546 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( 0.6v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>
|-
|45° sprint: <math display="inline">\textrm{Dist}^*(v_0,t) \approx 4.8584 v_0 + 0.288889t -1.185138 + 4 \times 0.91^t (v_0 - 0.169320)</math>
|-
|reg. sprint: <math display="inline">\textrm{Dist}^*(v_0,t) \approx 4.8584 v_0 + 0.283111t -1.115163 + 4 \times 0.91^t (v_0 - 0.158738)</math>
|}


<!--T:27-->
:<math display="inline">\textrm{Dist}^*(v_0,t) = 1.546 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( 0.6v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math>




=== Advanced Formulas ===
Horizontal speed after <math>n</math> consecutive sprintjumps on a momentum of period <math display="inline">T</math> (<math>n \geq 0</math>, <math>T \geq 2</math>).


If the first sprintjump is delayed, multiply <math display="inline">v_0</math> by 0.6
{| class="wikitable"
!<math display="inline">\textrm{V}^{\,n}_H(v_0,T,n) = \left ( 0.6 \times 0.91^T \right )^n v_0 + \left ( 0.6 \times 0.91^{T-1} J + 0.02M \frac{1 - 0.91^{T-1}}{0.09} \right ) \frac{1- (0.6 \times 0.91^T)^n}{1 - 0.6 \times 0.91^T} </math>
|}




== Advanced Formulas == <!--T:28-->
=== Examples ===


<!--T:29-->
*<math>Y_{rel}(60) </math> gives the relative height of the player 3 seconds (60 ticks) after jumping.
Horizontal speed after <math>n</math> consecutive sprintjumps on a momentum of period <math display="inline">T</math> (<math>n \geq 0</math>, <math>T \geq 2</math>).
*<math>\textrm{Dist}(0,12)</math> gives the jump distance on flat ground with no initial speed.

*<math>\textrm{Dist}( V_H(0,12) ,9)</math> gives the distance of a +1 jump with one sprintjump of flat momentum as initial speed.
<!--T:30-->
*<math>\textrm{Dist}(V^{10}_H(0,2), 12) </math> gives the jump distance with 10 sprintjumps of momentum under a trapdoor-headhitter.
:<math display="inline">\textrm{V}^{\,n}_H(v_0,T,n) = \left ( 0.6 \times 0.91^T \right )^n v_0 + \left ( 0.6 \times 0.91^{T-1} J + 0.02M \frac{1 - 0.91^{T-1}}{0.09} \right ) \frac{1- (0.6 \times 0.91^T)^n}{1 - 0.6 \times 0.91^T} </math>

<!--T:31-->
If the first sprintjump is delayed, multiply <math display="inline">v_0</math> by 0.6
</translate>

Latest revision as of 11:03, 29 June 2022

Other languages:

Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive functions to calculate simple but useful results, such as the height of the player on any given tick, or the distance of a jump in terms of the initial speed and duration.


Definitions:

  • is the player's initial speed (speed on , before jumping)
  • is the number of ticks considered (ex: the jump duration on flat ground is t=12, see Tiers)
  • is the "jump bonus" (0.3274 for sprintjump, 0.291924 for strafed sprintjump, 0.1 for 45° no-sprint jump...)
  • is the movement multiplier after jumping (1.3 for 45° sprint, 1.274 for normal sprint, 1.0 for no-sprint 45°...)


Vertical Movement (jump) [1.8]

Vertical speed after jumping ()


Relative height after jumping ()


For , see below.


Vertical Movement (jump) [1.9+]

Vertical speed after jumping ()


Relative height after jumping ()



Horizontal Movement (instant jump)

Assuming the player was airborne before jumping.

Horizontal speed after sprintjumping ()


Sprintjump distance ()


Note: These formulas are accurate for most values of , but some negative values can wind up activating the speed threshold and reset the player's speed at some point, thus rendering these formulas inaccurate.


Horizontal Movement (delayed jump)

Assuming the player is on ground before jumping (at least 1 tick since landing).

Horizontal speed after sprintjumping ()


Sprintjump distance ()



Advanced Formulas

Horizontal speed after consecutive sprintjumps on a momentum of period (, ).

If the first sprintjump is delayed, multiply by 0.6