A web application for visualizing strange attractors using TresJS and WASM.
- Lorenz Attractor (
$\sigma = 10, \rho = 28, \beta = \frac{8}{3}$ )
- Rössler Attractor (
$\alpha = 0.1, \beta = 0.1, \gamma = 14$ )
- Thomas Attractor (
$\beta = 0.208186$ )
- Dequan Li Attractor (
$\alpha = 40, \beta = 1.833, \gamma = 0.16, \delta = 0.65, \varepsilon = 55, \zeta = 20$ )
- Newton-Leipnik Attractor (
$\alpha = 0.4, \beta = 0.175$ )
- Nosé-Hoover Attractor (
$\alpha = 1.5$ )
- Halvorsen Attractor (
$\alpha = 1.4$ )
- Chen-Lee Attractor (
$\alpha = 5, \beta = -10, \gamma = -0.38$ )
- Bouali Attractor (
$\alpha = 0.1, \beta = -0.1, \mu=1$ )
- Finance Attractor (
$\alpha = 0.001, \beta = 0.2, \gamma = 1.1$ )
- Arneodo Attractor (
$\alpha = -5.5, \beta = 3.5, \gamma = -1$ )
- Sprott B Attractor (
$\alpha = 0.4, \beta = 1.2, \gamma = 1$ )
- Sprott-Linz F Attractor (
$\alpha = 0.5$ )
- Dadras Attractor (
$\alpha = 3, \beta = 2.7, \gamma = 1.7, \delta = 2, \varepsilon = 9$ )
- Runge-Kutta 4th Order Method
- Refactor code to using Rust WebAssembly
- FPS boost up to 2x
Make sure to install the dependencies:
# bun
bun install
You may also need Rust toolchain installed, and wasm-pack
for building the Rust WebAssembly:
# rustup
rustup install stable
cargo install wasm-pack
Start the development server on http://localhost:3000
:
# bun
bun run wasm && bun run dev
Build the application for production:
# bun
bun run wasm && bun run build
Generate a static version of the application:
# bun
bun run wasm && bun run generate
Either way, it will generate a dist
directory containing the static files that can be deployed to any static hosting service.
Locally preview production build (by either build
or generate
):
# bun
bun run preview