Koi School: 6 Fish Food Pellets: 0 Active Wave Energy: Calm
Tap to drop glowing food pellets & chime kalimba notes · Drag to swirl bioluminescent plankton

How the Bioluminescent Water Ripple & Procedural Koi Engine Works

Watching koi fish glide effortlessly through dark, mirror-still water while concentric ripples catch the glow of floating lanterns is a time-tested visual anchor for easing anxiety and restoring mental focus. Bioluminescent Koi & Ripple Pond combines a real-time 2D wave heightfield solver, multi-jointed fish spine kinematics, and a procedural Web Audio kalimba synthesizer in a single zero-dependency browser experience.

How to Interact With the Midnight Pond

  1. Drop Glowing Food Pellets: Click or tap anywhere on the pond surface. A warm bioluminescent pellet plops into the water, radiating concentric cyan-magenta interference waves and plucking a resonant pentatonic kalimba tine. Nearby koi immediately sense the ripple and steer smoothly toward the food.
  2. Swirl Bioluminescent Plankton Trails: Drag your finger or cursor across the water. Your movement disturbs hundreds of microscopic dinoflagellate plankton motes that glow neon aqua and violet in your wake while triggering a soft hydro-swish sound.
  3. Release Floating Lotus Lanterns: Click + Lotus Lantern in the bottom dock (or switch Tap Mode to Float Lotus Lantern) to place warm candle-lit blossoms that drift across the surface currents and gently repel passing ripples.
  4. Enter Fullscreen Landscape or Portrait Sanctuary: Click Fullscreen Landscape or Fullscreen Portrait at the top right to hide all adjustment sliders and expand the pitch-black pond across 100% of your screen.

Mathematical & Physical Models Under the Hood

Instead of playing pre-recorded video loops, every visual and acoustic element is computed live at 60 frames per second:

1. 2D Discrete Wave Propagation: u_next[x,y] = ((u[x-1,y] + u[x+1,y] + u[x,y-1] + u[x,y+1]) / 2 - u_prev[x,y]) × Damping (0.975)
2. Kinematic Spine Constraint (12 Segments): P_i = P_{i-1} - normalize(P_{i-1} - P_i) × Segment_Length + Lateral_Sinusoid(t, i)
3. Reynolds Arrival Steering Force: F_steer = clamp(Desired_Velocity - Current_Velocity, Max_Force)

Worked Example: Triggering the "Scatter Feast" Feeding Cascade

Click Scatter Feast (Load Example) in the floating pond dock to observe the multi-agent boid steering and pentatonic acoustics in action:

  • Six glowing food pellets drop across the pond over a 900-millisecond cascade, playing an ascending C-major pentatonic kalimba arpeggio (523.25 Hz → 587.33 Hz → 659.25 Hz → 783.99 Hz → 880.00 Hz → 1046.50 Hz).
  • Each koi evaluates the Euclidean distance $d = \sqrt{\Delta x^2 + \Delta y^2}$ to all active pellets and locks onto the closest unclaimed target, smoothly banking its 12-node spine curve and accelerating its tail beat frequency until it consumes the pellet with a soft water plop and burst of glowing particles.

Explore more verified interactive soundscapes, tactile instruments, and quiet relaxation tools on Gemsmakers:

Frequently Asked Questions

1. How does the interactive water ripple simulator calculate waves in real time?
The pond combines a sub-sampled 2D finite-difference wave heightfield with smooth analytical interference rings. Every tap or cursor drag injects displacement into the water grid, which spreads outward by averaging neighboring cells and applying a 0.975 viscous damping factor so ripples shimmer and settle naturally.
2. How do the procedural koi fish swim and react to food pellets?
Each koi is built from a 12-joint kinematic spine rather than a rigid sprite. The head calculates steering vectors toward the nearest glowing food pellet while avoiding pond walls, and each trailing vertebra follows smoothly with a natural S-curve tail oscillation.
3. How are the kalimba chimes and water plop sounds generated?
All sounds are synthesized live in your browser via the Web Audio API with zero external audio files. Water plops sweep a sine oscillator rapidly upward in pitch to mimic a submerged air bubble, while feeding and ripple splashes pluck warm pentatonic kalimba overtones.
4. Will this bioluminescent pond lag or drain battery on mobile phones?
No. By capping active plankton particles at 180 and using an optimized offscreen wave grid, the simulation maintains a fluid 60 FPS on phones, tablets, and desktops without heavy GPU overhead.
5. How do Fullscreen Landscape and Portrait modes work?
Clicking Fullscreen Landscape or Fullscreen Portrait hides all secondary sliders below the pond and stretches the water canvas across 100% of your display. On vertical phone screens where the browser blocks hardware rotation locks, Fullscreen Landscape automatically rotates the stage 90 degrees for wide panoramic viewing.
6. Can I customize the koi count and bioluminescent colors?
Yes. Use the Theme selector in the floating dock to switch between Pastel Neon Lagoon, Sakura Moonlit Pond, Deep Emerald Abyss, and Imperial Gold & Jade, or adjust the Koi School Size slider between 3 and 12 fish.