Perfect Freehand

Draw perfect pressure-sensitive freehand lines.

This is a Python port of the perfect-freehand library originally written by Steve Ruiz in TypeScript. Please reference the documentation for that library for additional usage examples, links to other implementations, and to support the original author.

Introduction

This package exports a function named perfect_freehand.get_stroke() that will generate the points for a polygon based on an array of points.

A GIF showing a stroke with input points, outline points, and a curved path connecting these points

To do this work, get_stroke() first creates a set of split points (red) based on the input points (grey) and then creates outline points (blue). You can render the result any way you like, using whichever technology you prefer.

Table of Contents

Indices and tables