算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
skill-107【设计与创意】Visualize complex network structures using D3.js (v6), enabling users to explore relationships and connections between data points.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill to create visual representations of network structures such as social networks, data relationships, or any interconnected systems using D3.js. The goal is to provide users with a visual insight into how different nodes are connected.
Activate this skill when the user asks for any of the following:
If the user requires more traditional data visualizations (e.g., charts, graphs), don’t use this skill—opt for the D3.js Visualization Skill instead.
*.json or *.csv containing node and link dataIf details are missing, make reasonable defaults and document them in comments near the top of the output file.
Prefer producing all of the following when feasible:
dist/network.html — standalone HTML that renders the network visualizationdist/network.svg — exported SVG representation of the networkdist/network.json — if the task requires a data export of the network structureAlways keep outputs in a predictable folder (default: dist/), unless the task specifies paths.
To create effective network visualizations:
<!DOCTYPE html>
<html>
<head>
<title>Network Visualization</title>
<script src="https://d3js.org/d3.v6.min.js"></script>
<script src="dist/network.js"></script>
</head>
<body>
<h1>Network Graph</h1>
<div id="network"></div>
</body>
</html>
This example demonstrates how to set up a simple HTML file to visualize a network. The network.js file would contain the logic for creating nodes and links and handling interactivity.