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

https://github.com/llllvvuu/standing-waves

generate adjacency matrix, visualize spectral decomposition of Laplacian, decompose arbitrary wave state with matching pursuit
https://github.com/llllvvuu/standing-waves

Last synced: 5 days ago
JSON representation

generate adjacency matrix, visualize spectral decomposition of Laplacian, decompose arbitrary wave state with matching pursuit

Awesome Lists containing this project

README

        

# Standing Waves

This is a CLI and a library for generating standing waves, with presets for hexagonal grid and rectangular grid graphs. HTML5 visualization is under `docs/`, and a copy is hosted at [https://llllvvuu.dev/standing-waves/](https://llllvvuu.dev/standing-waves/).

It also has a library, `matching_pursuit` which was generated by GPT-4. I have no idea whether it's correct, but it seems to work well enough for my demo app.

## Build/Test/Run

Requirements: [`g++-13`](https://gcc.gnu.org/), [`cmake`](https://cmake.org/), and [`vcpkg`](https://vcpkg.io/en/) in `$PATH`.

```sh
git submodule update --init --recursive
vcpkg install gtest
sh build.sh Release
./Release/test/runTests
./Release/src/standing_waves_cli hex 8 10 12 100
./Release/src/standing_waves_cli rect 10 10 100
```

For WASM (requires [`em++`](https://emscripten.org/index.html) and [`node`](https://nodejs.org/en) in `$PATH`):

```sh
sh build.sh Release WASM
node ./Release-WASM/test/runTests.js
node ./Release-WASM/src/standing_waves_cli.js
```

## Fix for `clangd` LSP `'emscripten/bind.h' file not found`

```sh
sh dotclangd.sh
```

## Build: HTML5 Visualization

```sh
cd docs
npm install
npm run build # or npm run watch
```

## TODO

For the rectangular case (and probably also for some other cases, although I haven't tried yet), there is a very simple closed form:
```
a sin(πnx)sin(πmy) + b sin(πmx)sin(πny)
```
The `a, b, m, n` parameterization should make it much easier to:
- choose superpositions that "go well" together
- render at a much higher resolution

I also want to render some dual graphs i.e. have edges lighting up.