JerboaBurrow / Hop

Lightweight, cross-platform, 2D game engine | ECS; Lua Console; Physics; Tile based
MIT License
0 stars 1 forks source link

Higher order integration; subsampling #34

Open Jerboa-app opened 1 year ago

Jerboa-app commented 1 year ago

Explore possibility for higher order integration and timestep subsampling

Jerboa-app commented 1 year ago

Yoshida computes 4 intermediate steps

e.g

$x{i}^{1} = x{i}+c{1}v{i} dt$ $v{i}^{1} = v{i}+d{1}a(x{i}^{1})dt$

then

$x{i}^{2} = x{i}^{1}+c{2}v{i}^1 dt$ $v{i}^{2} = v{i}^1+d{2}a(x{i}^{2})dt$ ...

The 4 computations of $a(x_{i}^{n})$ are expensive

What if we write $\partial{t} a(x{i}) \approx \frac{[f(dt)-1]a(x_{i}^{1})}{dt}$, so that

$a(x{i}^{n}) \approx f(dt)^n a(x{i}^{1})$

We can then have linear or non-linear assumptions like

$a(x{i}^{n}) \sim dt^n a(x{i}^{1})$ or $a(x{i}^{n}) \sim e^{-ndt}a(x{i}^1)$