poisson-process.js: a Random Time-Interval Generator

The software package poisson-process.js is a JavaScript library to generate naturally varying time intervals. It improves realism and natural unpredictability in your games or animations like for example aliens walking by a window or cars trying to drive over your character on a busy road. It can remove bottlenecks in distributed systems by adding jitter that prevents thundering herd problem. It can also simulate the frequency of chat messages, page loads or arriving emails as well as queues, traffic and earthquakes. The underlying mathematical concept is called the Poisson process.

The particle rain animation library Sprinkler.js uses the poisson-process.js extensively to make the rain look naturally random. It works quite well!

See examples and more at github.com/axelpale/poisson-process

Leave a Comment

Your email address will not be published. Required fields are marked *