newton-fractal icon indicating copy to clipboard operation
newton-fractal copied to clipboard

Drawing Newton's fractal using pure js, rust-wasm, SIMDs, threads and GPU

Newton's fractal

Runtime Newton's fractal renderer.

>>Click<< to open in your browser

Inspired by 3blue1brown's video about Newton's fractal.

Demo preview

Build

  1. Rust-wasm: wasm-pack build --target web
  2. TypeScript: tsc

Drawing techniques

1. Javascript fractal_calculation.ts and geometry.ts

2. Rust-WASM: scalar fractal_calculation.rs and geometry.rs

3. Rust-WASM: SIMD commands fractal_calculation.rs and simd_math.rs (includes comments)

4. GPU glslsources: webgl2_drawing.ts and gl_manager.ts
shaders: vertex.vert and fragment.frag

5. Multithreading for 1-3 techniquesdrawing_manager.ts and drawing_worker.ts