algorithm - Implementations of spring/electrostatic drawing for graphs with specified edge lengths -


suppose have non-planar graph $g$ specified edge lengths $(r_1,...,r_n) \in r$, not have specified coordinates vertices. want draw $g$ on 2 dimensional surface specifying edges springs of length, having electrostatic repulsion between vertices, , doing akin simulated annealing.

mathematica seems have functionality of above, doesn't let specify edge lengths. there software, in public domain or not, of this? i've tried tulip , graphviz. tulip doesn't let specify edge lengths, , graphviz has limited functionality in terms of specifying edge lengths , setting sort of parameters simulated annealing step.

update - happen know ahead of time particular set of edge lengths work! graph drawn on two-dimensional plain, don't have access coordinates.

i suppose i'm looking package can simulate two-dimensional network of balls , springs. molecular dynamics software can this, overhead there enormous...

like mark said, won't possible want. however, suggest trying levelscheme draw squiggly arrows springs. here's example:

<< "levelscheme`" pts = {{{0, 0}, {1, 1}}, {{0, 0}, {1, 1}}, {{1, 1}, {2, 0}}, {{2,       0}, {1, -1}}, {{1, -1}, {0, 0}}, {{0, 0}, {2, 0}}}; figure[{   setoptions[schemearrow, arrowtype -> squigglearrow],   schemearrow @@@ pts   },  plotrange -> {{-0.1, 2.1}, {-1.1, 1.1}}  ] 

enter image description here

you can embellish changing wavelength of arrows individually, represent different tension in springs , add little disks represent vertices, etc. bastardization of level scheme diagrams in nuclear physics, guess close want.


Comments