Iwerlipse: Difference between revisions

Jump to navigation Jump to search
No change in size ,  17 October 2025
m
Put section headings back into sentence case
(Significantly reduce usage of <math> tags to reduce chance of "Math extension cannot connect to Restbase" error)
m (Put section headings back into sentence case)
Β 
Line 27: Line 27:
In terms of total distance acquired along some direction, forward velocity is thus more effective over long periods of time, where it has time to accelerate to large values, whereas sideways speed is more effective over short periods of time. Optimal straining over many frames then involves straining mostly along the forwards direction to build up a large forward velocity, and then towards the end of the trajectory, transitioning into sideways straining to exploit the large sideways displacement obtainable in a single frame.
In terms of total distance acquired along some direction, forward velocity is thus more effective over long periods of time, where it has time to accelerate to large values, whereas sideways speed is more effective over short periods of time. Optimal straining over many frames then involves straining mostly along the forwards direction to build up a large forward velocity, and then towards the end of the trajectory, transitioning into sideways straining to exploit the large sideways displacement obtainable in a single frame.


==Update Equations==
==Update equations==


When Mario is in the air and cannot turn, the function <code>update_air_without_turn</code> is responsible for updating Mario's velocity variables from one frame, ''t''-1, to the next, ''t''. Without loss of generality, we can choose coordinates so that Mario's facing angle is zero. In other words, he is facing along the z-axis, while his sideways speed is directed along the x-axis. Mario's forward velocity and position coordinates are then updated via
When Mario is in the air and cannot turn, the function <code>update_air_without_turn</code> is responsible for updating Mario's velocity variables from one frame, ''t''-1, to the next, ''t''. Without loss of generality, we can choose coordinates so that Mario's facing angle is zero. In other words, he is facing along the z-axis, while his sideways speed is directed along the x-axis. Mario's forward velocity and position coordinates are then updated via
Line 61: Line 61:
In deriving the expression for ''z<sub>T</sub>'' we have used that the sum of the first ''T'' integers is equal to the triangle number ''T''(''T''+1)/2, and we have grouped together terms of cos(πœ™<sub>t</sub>). Notice that, since forward straining produces an acceleration that is not reset between frames, earlier frames have a stronger effect on ''z<sub>T</sub>'' than later frames. The effective strength is 1.5(''T''+1-''t''), i.e. 1.5 multiplied by the number of frames remaining (including the current frame), since the forward velocity gained on one frame produces a displacement also on all remaining frames.
In deriving the expression for ''z<sub>T</sub>'' we have used that the sum of the first ''T'' integers is equal to the triangle number ''T''(''T''+1)/2, and we have grouped together terms of cos(πœ™<sub>t</sub>). Notice that, since forward straining produces an acceleration that is not reset between frames, earlier frames have a stronger effect on ''z<sub>T</sub>'' than later frames. The effective strength is 1.5(''T''+1-''t''), i.e. 1.5 multiplied by the number of frames remaining (including the current frame), since the forward velocity gained on one frame produces a displacement also on all remaining frames.


==Arctan Straining Proof==
==Arctan straining proof==


The displacement vector after ''T'' frames is '''R''' = (''x<sub>T</sub>'' βˆ’ ''x<sub>0</sub>'') '''xΜ‚''' + (''z<sub>T</sub>'' βˆ’ ''z<sub>0</sub>'') '''αΊ‘'''. Taking the dot product of this with the unit vector along the target angle ''Ο‰'' gives the distance moved along this angle
The displacement vector after ''T'' frames is '''R''' = (''x<sub>T</sub>'' βˆ’ ''x<sub>0</sub>'') '''xΜ‚''' + (''z<sub>T</sub>'' βˆ’ ''z<sub>0</sub>'') '''αΊ‘'''. Taking the dot product of this with the unit vector along the target angle ''Ο‰'' gives the distance moved along this angle
Line 78: Line 78:
where we have also rotated the coordinate system back to allow for general facing angles ΞΈ. Since tan(''x'') = tan(''x''Β±180Β°), this equation has two unique solutions for πœ™<sub>t</sub> which are given above.
where we have also rotated the coordinate system back to allow for general facing angles ΞΈ. Since tan(''x'') = tan(''x''Β±180Β°), this equation has two unique solutions for πœ™<sub>t</sub> which are given above.


== Iwerlipse Equations ==
== Iwerlipse equations ==


By writing sin(πœ™<sub>t</sub>) and cos(πœ™<sub>t</sub>) in terms of tan(πœ™<sub>t</sub>), and using the optimal straining relation, we obtain exact expressions for the boundary of the Iwerlipse after ''T'' frames
By writing sin(πœ™<sub>t</sub>) and cos(πœ™<sub>t</sub>) in terms of tan(πœ™<sub>t</sub>), and using the optimal straining relation, we obtain exact expressions for the boundary of the Iwerlipse after ''T'' frames
Line 105: Line 105:
with exponents ''m(T)'' and ''n(T)'' found by minimizing the error. These have been computed up to large ''T'', and can be obtained from a lookup table<ref>[https://drive.google.com/file/d/1xDmgHz878qiAS1ZF1Y5M0M1eiZUdZRSl/view?usp=sharing Showing Iwer's proof and deriving the Iwerlipse expressions.]</ref>. In the limit ''T'' ≫ 1, the exponents converge to ''m'' β‰ˆ 2.520897 and ''n'' β‰ˆ 2.064371, but unlike the integral approximation, the expression never converges to the exact result β€” there is always some small error.
with exponents ''m(T)'' and ''n(T)'' found by minimizing the error. These have been computed up to large ''T'', and can be obtained from a lookup table<ref>[https://drive.google.com/file/d/1xDmgHz878qiAS1ZF1Y5M0M1eiZUdZRSl/view?usp=sharing Showing Iwer's proof and deriving the Iwerlipse expressions.]</ref>. In the limit ''T'' ≫ 1, the exponents converge to ''m'' β‰ˆ 2.520897 and ''n'' β‰ˆ 2.064371, but unlike the integral approximation, the expression never converges to the exact result β€” there is always some small error.


== Quarterstep Penalty ==
== Quarterstep penalty ==


If a number of quartersteps, ''q'' ∈ {0,1,2,3}, are lost on the final frame, the forward velocity gained on frame ''t'' no longer accumulates forward distance over ''T''+1-''t'' frames, but instead over ''T'' - ''q''/4 + 1 - ''t'' frames. The optimal straining relation then becomes:
If a number of quartersteps, ''q'' ∈ {0,1,2,3}, are lost on the final frame, the forward velocity gained on frame ''t'' no longer accumulates forward distance over ''T''+1-''t'' frames, but instead over ''T'' - ''q''/4 + 1 - ''t'' frames. The optimal straining relation then becomes:
Line 175: Line 175:
sm64expert adds arctan straining to [https://github.com/mupen64/SM64LuaRedux SM64 Lua Redux].
sm64expert adds arctan straining to [https://github.com/mupen64/SM64LuaRedux SM64 Lua Redux].


==See Also==
==See also==
[[Straining]]
[[Straining]]


9

edits

Navigation menu