47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.0 KiB
2.0 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, framework, params, output, notes
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | framework | params | output | notes | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| chord | component | cpp | viz | 1.0.0 | pure | void chord(const char* id, const float* matrix, int n, const char* const* labels, ImVec2 size) | Chord diagram para matrices NxN de relaciones. Arcos circulares proporcionales a sum(row) + bandas curvas internas (bezier cubico) entre arcos. |
|
false |
|
false | cpp/functions/viz/chord.cpp | imgui |
|
Renderiza arcos en el borde y cuerdas curvas internas usando AddConvexPolyFilled + AddText | scaffolding/demo en primitives_gallery |
chord
Chord diagram. Cada nodo ocupa un arco proporcional a la suma de su fila. Las cuerdas representan la magnitud de cada celda matrix[i,j] como bandas curvas (bezier cubico hacia el centro) que conectan el arco de i con el de j.
Limitaciones
- Las cuerdas se dibujan con
AddConvexPolyFilledaunque la forma no sea estrictamente convexa — en la practica el renderer ImGui las acepta y queda visualmente razonable. - Para matrices simetricas se dibuja matrix[i,j] y matrix[j,i] como cuerdas separadas que pueden solaparse. El caller puede pasar la matriz triangulada superior + 0s en la inferior si quiere una cuerda por par.
- Sin interaccion ni tooltip.
Ejemplo
const int N = 4;
float M[N*N] = {
0, 10, 6, 12,
8, 0, 14, 3,
4, 11, 0, 9,
7, 5, 2, 0,
};
const char* labels[N] = {"AAA", "BBB", "CCC", "DDD"};
chord("##flows", M, N, labels);