tions)
            .force("center", d3.forceCenter(center.x, center.y))
            .force("collide", d3.forceCollide().radius(d => nodeRadius * 1.5).strength(0.7));

        // Run the simulation for a few iterations
        for (let i = 0; i < 15; ++i) simulation.tick();

        // Draw the nodes
        nodePositions.forEach(function(d) {
            const currentRadius = d.radius || nodeRadius; 
            const foreignObject = svg.append('foreignObject')
                .attr('class', 'node-foreign-o