Connecting the dots

Pts is about connecting the dots, like seeing the Big Dipper in a sky full of stars, like spotting dust in the air illuminated by a beam of light.

Pts enables you to compose and visualize these invisible points, and to creatively express what you see in your mind's eyes — points as ideas, shapes, colors, motions, interactions, and more.

Get started

A modern javascript library

Written in typescript and compiled to javascript ES6, Pts is lightweight and modular. It also comes with many useful algorithms for data visualization and creative coding.

Use it directly (link from unpkg or download from github):
<script src="/path/to/pts.min.js"></script>

Or install it via npm like this:
npm install pts

Draw a dot that follows the pointer in a single line of code:
Pts.quickStart("myID")(t => form.point(space.pointer))
Or something more in just 5 lines of code.

See demos
Linear algebra in an easy-to-use, non-technical API.
Minimal code for quick iterations across canvas, svg, and other formats.
Handy functions for geometry, color, simulation, and many more.
Lightweight library to use on its own, and together with other libraries.