run2_d3-force-clustering
Advanced clustering techniques in D3.js force simulations for compact and aesthetically pleasing layouts.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 92
- Forks
- 7
01 前言 Front Matter
- name
- run2_d3-force-clustering
- description
- Advanced clustering techniques in D3.js force simulations for compact and aesthetically pleasing layouts.
03 SKILL.md 正文
Advanced D3 Force Clustering
This skill focuses on creating compact, sector-based clusters that are visually grouped but centrally located.
Dynamic Cluster Centers
Instead of a rigid grid, use a radial layout or a packed grid for cluster centers to keep them "close together".
const clusterCenters = sectors.map((s, i) => {
const angle = (i / sectors.length) * 2 * Math.PI;
const radius = 150; // Distance from center
return {
sector: s,
x: width / 2 + radius * Math.cos(angle),
y: height / 2 + radius * Math.sin(angle)
};
});
Collision with Padding
Ensure bubbles don't overlap by adding padding to the collision force.
simulation.force("collide", d3.forceCollide().radius(d => getRadius(d) + 2).iterations(4));
Grouping Forces
Apply forces that pull nodes towards their specific cluster center.
simulation
.force("x", d3.forceX(d => centers[d.sector].x).strength(0.2))
.force("y", d3.forceY(d => centers[d.sector].y).strength(0.2))
.force("center", d3.forceCenter(width / 2, height / 2));
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.