/*
ok, here's the idea:
- for each possible page-folding
config:
- create a GNG from the
possible space occupied by the
edges around the paragraphs
- turn it into a MST
- locate the possible starting and
stopping points
- find the path
- create a bezier along it
- make sure we don't overlap the
paragraphs, otherwise
rerun with stronger boundary
padding
- render the edge text to svg
- create a place-on-path version
of it
- render it to PDF
*/
I merely have to implement :-/
That's the GNG output for unfolded six pages.
I adopted some else's Dijkstra implementation, and it's bloody slow đź’¤
Given the nature of my project, I should rather use ant colony optimisation… Anyway, too late, thing is running...
The bloody neural gas crossed the boundary, and Mr Dijkstra was quick to follow :-/
Getting there (still)... some margins are off, sigh