An open API service indexing awesome lists of open source software.

https://github.com/yuukitoriyama/leaflet.fractal.julia

Display Julia Set on Leaflet.js
https://github.com/yuukitoriyama/leaflet.fractal.julia

leaflet-plugin leafletjs mathematics

Last synced: 12 months ago
JSON representation

Display Julia Set on Leaflet.js

Awesome Lists containing this project

README

          

# Leaflet.Fractal.Julia

![npm](https://img.shields.io/npm/v/leaflet.fractal.julia)
![GitHub last commit](https://img.shields.io/github/last-commit/YUUKIToriyama/Leaflet.Fractal.Julia)

Display Julia Set on Leaflet.js

![julia set](https://i.imgur.com/Ju2UYH2.png)

## Abstract

ジュリア集合を表示させることができる Leaflet プラグインです。
ズームイン・アウトをするたびに計算処理が行なわれ、タイルがレンダリングされます。
ジュリア集合の計算には WebAssembly を用いており、高速なレンダリング処理を可能にしています。

## Usage

### Load from jsDelivr

```html

```

### via npm.js

```terminal
npm install leaflet.fractal.julia
```

## Example

https://yuukitoriyama.github.io/Leaflet.Fractal.Julia/index.html

```html




const div = document.getElementById("viewer");
// L.Mapを作成
const viewer = L.map(div, {
center: [0, 0],
zoom: 0,
crs: L.CRS.Simple,
});
// initメソッドを呼び、Wasmをロード
await JuliaSetLayer.init();
// ジュリア集合を定義
const juliaSetLayer = new JuliaSetLayer({
re: -0.15,
im: 0.65,
});
// レイヤーとしてL.Mapに追加
viewer.addLayer(juliaSetLayer);

```

## Gallery

| $-0.15 + 0.65i$ | $0.11131 - 0.6289i$ | $-0.4004 - 0.585i$ |
| :----------------------------------: | :----------------------------------: | :----------------------------------: |
| ![](https://i.imgur.com/f5WjiVK.png) | ![](https://i.imgur.com/unUGUpV.png) | ![](https://i.imgur.com/YOLgUhd.png) |

## Related Project

- https://github.com/IvanSanchez/Leaflet.MandelbrotGL
- https://rustwasm.github.io/wasm-bindgen/examples/julia.html

## Author

Torichan([@CoconMap](https://twitter.com/coconmap))