java - Draw nodes in e.g. a Chord ring -


i have set of nodes put ring. have numeric property use reference when putting ring.

e.g, node param 32 comes after node para 22.

what need library (or that) can make possible have correct "distance" between nodes, e.g: between 22 , 32 10 "units", , between 32 , 35 3 "units" "units" may empty numeric slot.

sounds need sorted list end links start. know of no standard implementation, pretty easy implement 1 yourself.

something doubly linked list head , tail connected work. add operations have traverse list find appropriate position insert into, making insert o(n) operation. make list perform realtivly poorly, pretty all standard list operations being o(n).

you implement distancetonext and/or distancetoprevious pretty getting values of current , next/previous nodes , returning difference.

edit:
realised question title looking gui library draw these , hinted @ model might use. i'll have think gui.

edit 2:
problem boils down how draw polygon when know length of sides. asked on maths stack exchange you.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -