Skip to content
프로젝트

소개

일반 텍스트로 표기법을 입력하기만 하면 아름다운 다이어그램을 만들 수 있습니다.

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+8
in 15 days
+13
in 1 month
+13

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Penrose npm (scoped) license Build Discord Twitter: @UsePenrose

Penrose is a platform that enables people to create beautiful diagrams just by typing notation in plain text. The goal is to make it easy for non-experts to create and explore high-quality diagrams and provide deeper insight into challenging technical concepts. We aim to democratize the process of creating visual intuition.

Usage

You can try Penrose in your browser without any installation. For a more detailed step-by-step introduction, check out our tutorials. Or, for more reference-style information, take a look at our documentation.

Example

Here's a simple Penrose visualization in the domain of set theory.

It's specified by the following trio of Domain, Substance, and Style programs (with variation MonsoonCaterpillar95943):

  • setTheory.domain:

    type Set
    
    predicate Disjoint(Set s1, Set s2)
    predicate Intersecting(Set s1, Set s2)
    predicate Subset(Set s1, Set s2)
    
  • tree.substance:

    Set A, B, C, D, E, F, G
    
    Subset(B, A)
    Subset(C, A)
    Subset(D, B)
    Subset(E, B)
    Subset(F, C)
    Subset(G, C)
    
    Disjoint(E, D)
    Disjoint(F, G)
    Disjoint(B, C)
    
    AutoLabel All
    
  • euler.style:

    canvas {
      width = 800
      height = 700
    }
    
    forall Set x {
      shape x.icon = Circle { }
      shape x.text = Equation {
        string : x.label
        fontSize : "32px"
      }
      ensure contains(x.icon, x.text)
      encourage norm(x.text.center - x.icon.center) == 0
      layer x.text above x.icon
    }
    
    forall Set x; Set y
    where Subset(x, y) {
      ensure disjoint(y.text, x.icon, 10)
      ensure contains(y.icon, x.icon, 5)
      layer x.icon above y.icon
    }
    
    forall Set x; Set y
    where Disjoint(x, y) {
      ensure disjoint(x.icon, y.icon)
    }
    
    forall Set x; Set y
    where Intersecting(x, y) {
      ensure overlapping(x.icon, y.icon)
      ensure disjoint(y.text, x.icon)
      ensure disjoint(x.text, y.icon)
    }
    

Contributing

See CONTRIBUTING.md.

License

This repository is licensed under the MIT License.

관련 프로젝트 살펴보기

불러오는 중…