项目作者: bensondaled

项目描述 :
matplotlib patch of a curly brace
高级语言: Python
项目地址: git://github.com/bensondaled/curly_brace.git
创建时间: 2018-11-19T21:42:39Z
项目社区:https://github.com/bensondaled/curly_brace

开源协议:Apache License 2.0

下载


A matplotlib patch for drawing a curly brace. See docstring for usage details.

img not found

The history

I wanted to draw a curly brace (“}”) onto a figure and was unsatisfied with the option of using text, since that creates a fairly thick and uniform curly brace that cannot be modified.

After searching around a bit, I drew one manually in Inkscape and realized that it can be described surprisingly simply using Bezier curves.

So I messed around and realized that the “Bezier parameterization” of the curly brace is incredibly simple. It involves just two 2-control-point Bezier curves which are mirror images, and therefore just one free parameter corresponding to curliness. It was interesting to discover that I had, by eye, chosen almost exactly 1/e for this value.