Diagrams are essential tools for problem-solving and communication as they externalize conceptual structures using spatial relationships. But when picking a diagramming framework, users are faced with a dilemma. They can either use a highly expressive but low-level toolkit, whose API does not match their domain-specific concepts, or select a high-level typology, which offers a recognizable vocabulary but supports a limited range of diagrams. To address this gap, we introduce Bluefish: a diagramming framework inspired by component-based user interface (UI) libraries. Bluefish lets users create diagrams using relations: declarative, composable, and extensible diagram fragments that relax the concept of a UI component. Unlike a component, a relation does not have sole ownership over its children nor does it need to fully specify their layout. To render diagrams, Bluefish extends a traditional tree-based scenegraph to a compound graph that captures both hierarchical and adjacent relationships between nodes. To evaluate our system, we construct a diverse example gallery covering many domains including mathematics, physics, computer science, and even cooking. We show that Bluefish's relations are effective declarative primitives for diagrams. Bluefish is open source, and we aim to shape it into both a usable tool and a research platform.
翻译:图表作为利用空间关系外化概念结构的工具,在问题解决与交流中不可或缺。然而在选择图表框架时,用户面临两难困境:要么使用表达能力强大但底层抽象的套件——其API无法匹配领域特定概念;要么选择高级类型系统——虽提供可识别词汇表但仅支持有限图表类型。为填补这一空白,我们提出Bluefish:一个受基于组件的用户界面(UI)库启发的图表框架。Bluefish允许用户通过关系创建图表——这些声明式、可组合且可扩展的图表片段,松化了UI组件的概念。与组件不同,关系既不独占其子元素的所有权,也无需完全指定其布局。为渲染图表,Bluefish将传统的基于树的场景图扩展为复合图,该复合图同时捕获节点间的层次关系与相邻关系。为评估系统性能,我们构建了涵盖数学、物理、计算机科学乃至烹饪等多领域的多样化示例库。实验表明,Bluefish的关系机制是有效的声明式图表原语。Bluefish已开源,我们致力于将其发展为实用工具与研究平台并重的系统。