I am trying to use a variation of this code from https://stackoverflow.com/a/53426084
let number = 12; // how many number to be placed
let size = 260; // size of circle i.e. w = h = 260
let cx= size/2; // center of x(in a circle)
let cy = size/2; // center of y(in a circle)
let r = size/2; // radius of a circle
let nodes = [];
for(let i=1; i<=number; i++) {
let node = {}
let ang = i*(Math.PI/(number/2));
let left = cx + (r*Math.cos(ang));
let top = cy + (r*Math.sin(ang));
node.x = left;
node.y = top;
nodes.push(node)
}
But let's say I already have the position of n num of nodes. Would I be able to make this a bit more dynamic to be able to support that?
Basically I will have a node have a circle of nodes around it. And then those circles will have nodes around them but I want that 'parent(s)' node to be part of the distributed points.