Pinfinite
Pinfinite is a fully client-side experiment to play with randomness using mathematical functions. It generates infinite, unique background patterns and gradients for SaaS projects. Patterns are mathematically generated, infinitely scrollable, and can be previewed live and copied in one click as CSS, Tailwind, or SVG.
Technical Details
- Infinite patterns: mathematically generated unique backgrounds
- Live preview: real-time pattern visualization
- One-click copy: export as CSS, Tailwind, or SVG
- Favorites: save and manage your favorite patterns
- Random generation: fresh patterns on every refresh
- Fully client-side app
- Seeded random generation for reproducible patterns
- 21 pattern types: geometric, wave, gradient, SVG, noise, etc.
- Efficient algorithms: pure math, no external libraries
- Virtual scrolling for infinite collections
Mathematical Foundation
Seeded Random Generation
function seededRandom(seed: number): number {
const x = Math.sin(seed * 12.9898 + seed * 78.233) * 43758.5453
return x - Math.floor(x)
}Uses trigonometric functions to create deterministic pseudo-random values from any seed.
Color Generation
// hsl color with seeded variations
hue = floor(random(seed × 1.23) × 360)
saturation = base + (random(seed × 1.45) - 0.5) × 20
lightness = base + (random(seed × 1.67) - 0.5) × 15