maxitg / SetReplace

C++/Wolfram Language package for exploring set and graph rewriting systems
MIT License
219 stars 44 forks source link

Spring-electrical coordinate solver #623

Open maxitg opened 3 years ago

maxitg commented 3 years ago

The problem

To make evolution videos #443, we need to determine vertex coordinates in each frame. This can be done using the spring-electrical simulator, where vertices are considered charged particles connected by springs corresponding to edges.

We need code that will take a single hypergraph history and produce a list of frames, each containing coordinates of all vertices.

Possible solution

There is a partial implementation in the evolutionVideo branch.

Ideally, we want an n log n GPU implementation. But it will take a few steps to get there:

It would be nice to expose this as separate property in case users want to do something else with these coordinates or use a custom renderer.

Additional context

To create evolution videos, we will also need to figure out the self-loops' orientation, as we cannot allow it to jump around frame-to-frame. But that will be a separate issue.