React Poincare Disc Animation
Animated hyperbolic Poincare disc tiling with CSG polygons and geometric patterns. Pure WebGL hyperbolic geometry for React with TypeScript and shadcn/ui—mathematical visualization meets performance.
Building hyperbolic geometry effects?
Join our Discord community for help from other developers working with WebGL shaders.
Creating animated hyperbolic tilings requires deep understanding of non-Euclidean geometry and complex mathematical transformations. This React component uses CSG polygon-driven Poincare disc tiling with animated pattern overlays, hyperbolic reflections, and circle inversion mathematics to create mesmerizing geometric animations that showcase the beauty of hyperbolic space.
Hyperbolic geometric animation
Beautiful Poincare disc tiling with animated geometric patterns and hyperbolic transformations:
Created by Shane in 2023-12-11
Built for React applications with TypeScript and Next.js in mind. The animation runs entirely on the GPU using WebGL with hyperbolic geometry mathematics, circle inversion operations, and sophisticated polygon tiling algorithms. Works seamlessly with shadcn/ui design systems.
Installation
npx shadcn@latest add https://www.shadcn.io/registry/poincare-disc-animation-shaders.json
npx shadcn@latest add https://www.shadcn.io/registry/poincare-disc-animation-shaders.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/poincare-disc-animation-shaders.json
bunx shadcn@latest add https://www.shadcn.io/registry/poincare-disc-animation-shaders.json
Usage
import { PoincareDiscAnimationShaders } from "@/components/ui/poincare-disc-animation-shaders";
export default function Hero() {
return (
<PoincareDiscAnimationShaders>
<div className="relative z-10">
<h1>Your content here</h1>
</div>
</PoincareDiscAnimationShaders>
);
}
Why most hyperbolic implementations fail
Most developers try to create hyperbolic tilings using regular Euclidean transformations or pre-computed meshes. Completely wrong approach. You're missing the fundamental mathematics of non-Euclidean geometry, circle inversion, and Möbius transformations that define hyperbolic space. Basic implementations often produce distorted results or fail to maintain the proper geometric relationships.
This React component uses authentic hyperbolic geometry with circle inversion mathematics, Möbius transformations, and CSG polygon operations. The GPU handles everything using optimized hyperbolic reflection algorithms with proper chirality maintenance and distance field calculations. No Euclidean approximations, no geometric distortions, just pure hyperbolic mathematics at 60fps.
Features
- Zero geometric approximations - Pure hyperbolic geometry with circle inversion and Möbius transformations
- CSG polygon-driven tiling using triangle (3-8) and quad (4-6) configurations
- Animated pattern overlays with hyperbolic-aware movement and direction reversal
- Mouse interaction support with circle inversion for intuitive navigation
- TypeScript definitions for proper IDE support in React projects
- Customizable parameters with 5 props for complete geometric control
- Performance optimization through efficient GPU-based hyperbolic calculations
- shadcn/ui compatible for consistent design systems
- Responsive design with automatic canvas resizing and anti-aliasing
API Reference
PoincareDiscAnimationShaders
Main container component for the Poincare disc animation effect.
Prop | Type | Default | Description |
---|---|---|---|
speed | number | 1.0 | Animation speed multiplier (0.1 to 3.0) |
polygonType | number | 0 | Polygon type (0: Triangle 3-8, 1: Quad 4-6) |
rotationSpeed | number | 1.0 | Canvas rotation speed (0.1 to 3.0) |
animationScale | number | 1.0 | Animated pattern scale (0.5 to 2.0) |
colorIntensity | number | 1.0 | Color variation intensity (0.0 to 2.0) |
className | string | - | Additional Tailwind CSS classes |
...props | HTMLAttributes<HTMLDivElement> | - | All standard div props |
Common gotchas
Animation not appearing: Hyperbolic transformations require high precision floating-point calculations. Older devices may struggle with the complex mathematics involved.
Performance issues on mobile: Circle inversion and Möbius transformations are computationally intensive. Consider reducing animationScale
and speed
for better mobile performance.
Mouse interaction not working: The mouse inversion system requires proper coordinate transformation. Ensure the component has sufficient size and isn't clipped by parent containers.
Polygons looking distorted: The shader uses specific mathematical constants for triangle (3-8) and quad (4-6) configurations. Other polygon combinations may not render correctly with current implementation.
Colors too uniform: Increase colorIntensity
to enhance the procedural coloring based on hyperbolic reflection count and geometric position.
You might also like
Explore other shader-based background components for React applications:
Mandelbrot Patterns
Decorated Mandelbrot fractal with complex pattern overlays
Mobius Spiral Shaders
Raymarched 3D extruded Mobius spiral patterns
2D Noise Contours
Smooth fractal contour lines with numerical gradients
3-Tap Voronoi Shaders
Ultra-fast 3-tap Voronoi with simplex grid and highlights
Cellular Tiled Tunnel
Raymarched 2nd-order Voronoi tunnel with 3D cellular tiling
Smooth Voronoi Contours
Voronoi cellular patterns with smooth contour lines
Questions developers actually ask
React Plasma Shaders
React plasma effect with GPU energy patterns. Organic plasma animations for Next.js with TypeScript and shadcn/ui—free code.
React Pyramid Pattern
Animated pyramid patterns with bump mapping and noise-driven offset tips. Pure WebGL geometric patterns for React with TypeScript and shadcn/ui—dimensional texture meets performance.