Directed Force Algorithm

Does anyone have either a Xojo snippet or complete pseudo code for the “Directed Force” algorithm to layout a series of connected nodes?

my node class is (simple)

classNODE
  id as integer
  caption as string
  location as realbasic.point
  size as realbasic.size
  connections(-1) as integer

where
id is a unique value to distinguish this node
and caption would be a simple label to be drawn at “location” in a rectangle of "size’
and the connections array is the ID of 0 to n other classNode objects to which this one is “connected”

Given an array of such nodes, I need to apply an algorithm to adjust the location of each node for a “reasonable” starting layout
The user will then have the option to drag the nodes around as they see fit… but I need something other than a “random” starting layout

All the discussions I have found about “Directed Force” are theoretical , or engineered to a more complex data model than this

From one of the references on https://en.wikipedia.org/wiki/Force-directed_graph_drawing

Interactive and real-time force-directed graphing algorithms used in an online database modeling tool
http://www.anchormodeling.com/modeler/

I’d check out Graphoon.
The code is in Lua, but that shares much in common with Basic syntax and might give you a start…

Thank you Norm… but those are some of the “theoretical” articles I have looked at

Jeff… I will thanks

Modeller is a full blown implementation as well

This is JavaScript but looks interesting
springy