from Hacker News

Show HN: A novel math library for the TypeScript community

by clumsycomputer on 9/13/22, 10:38 PM with 0 comments

here is a little library of fun math functions and types that have been slowly iterated on in one form or another during my free time for the past decade

the stuff on rhythm is the most fleshed out and should be documented enough for others to dive into

theres also some rough utilities for playing with prime numbers which can be helpful when composing rhythms

the next step for this library is to implement functions and types dealing with the concept of a loop which is a generalization of a circle, ellipse, and egg plus additional features!! this abstraction is what im most excited about right now but the current implementation is rather slow for professional use when dealing with audio/signals

the majority of the code presented here was developed in the context of me playing with simple 2d graphics and animations and thus may hinder more serious use from others. nonetheless i felt like it was time to share

if you want to play around with the code yourself i recommend using a tool that ive been developing that enables rapidly developing animations where frames are described using svg elements ⓐ la react

https://github.com/clumsycomputer/clumsy-graphics