penrose/penrose

Optionally render diagrams as sketches

开放

#1,574 创建于 2023年7月20日

 (1 条评论) (1 个反应) (0 位负责人)Haskell (224 个派生)batch import
good first issue

仓库指标

星标
 (4,756 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Tools like excalidraw produce diagrams that have a "sketched" look, which has some unique values for informal communication. The research literature from many fields recognize these values too (e.g. roles that sketches and schemas play in the architectural design process, this review paper on computational sketches etc).

While Penrose is designed to produce polished diagrams, we can support an alternative, sketch-y look thanks to existing techniques. For example, @jeremyong shared this paper on computationally generating sketchy geometries.

In the past, @maxkrieger experimented with rough.js. I recently revisited svg2roughjs, a nicer package that transforms SVGs to sketches. Here are some examples:

svg2roughjs (1) A Caffeine Molecule svg2roughjs (2) Brownian Motion in a Ball

The results look great, except for the TeX labels, which might need some special care. Notably, they are in a much smaller coordinate system, so there might be some numerical problems.

Next steps

  • Include svg2roughjs as a dependency in editor.
  • Add an optional rendering mode to the diagram panel for "Sketch-like SVGs."
  • Figure out how to make TeX expression sketch-like

贡献者指南