438

Organic Wave

Harmonic superposition of linear sinusoidal waves and radial distance ripples creating a rhythmic, breathing undulating mesh.

Playground
60 FPS • Canvas 2D
Click + Drag to interact with field
</>

Full Executable Algorithm Code


import type { ArtRenderer, ParameterState, RenderContext, TimeState } from '../../types/engine';
import { hsla } from '../common/color';

export function createOrganicWave(): ArtRenderer {
  let gridPointsX = 0;
  let gridPointsY = 0;
  const spacing = 14;

  return {
    setup(context: RenderContext) {
      gridPointsX = Math.ceil(context.width / spacing) + 2;
      gridPointsY = Math.ceil(context.height / spacing) + 2;
    },

    render(context: RenderContext, timeState: TimeState, params: ParameterState) {
      const { ctx, width, height } = context;
      const t = timeState.time * Number(params.speed || 1.0);
      const freq = Number(params.frequency || 0.02);
      const amp = Number(params.amplitude || 35);
      const hueBase = Number(params.hue || 195);

      // Dark fade for trail effect
      ctx.fillStyle = 'rgba(8, 9, 13, 0.25)';
      ctx.fillRect(0, 0, width, height);

      const cx = width * 0.5;
      const cy = height * 0.5;

      for (let y = 0; y < gridPointsY; y++) {
        const py = (y - 1) * spacing;
        ctx.beginPath();

        for (let x = 0; x < gridPointsX; x++) {
          const px = (x - 1) * spacing;
          
          const dx = px - cx;
          const dy = py - cy;
          const d = Math.sqrt(dx * dx + dy * dy);

          // Combined wave mathematical transformation
          const wave1 = Math.sin(px * freq + t) * Math.cos(py * freq * 0.7 + t * 0.5);
          const wave2 = Math.sin(d * freq * 1.5 - t * 2.0) * 0.5;
          const offset = (wave1 + wave2) * amp;

          const renderX = px + (dx / (d + 1)) * offset * 0.3;
          const renderY = py + offset;

          if (x === 0) {
            ctx.moveTo(renderX, renderY);
          } else {
            ctx.lineTo(renderX, renderY);
          }
        }

        const normY = y / gridPointsY;
        const hue = (hueBase + normY * 60 + Math.sin(t) * 20) % 360;
        ctx.strokeStyle = hsla(hue, 85, 60, 0.5);
        ctx.lineWidth = 1.2;
        ctx.stroke();
      }
    },
  };
}
Edit in Interactive Playground Zero Dependencies • Standalone Canvas 2D
ƒ

Mathematical Formulation

low
Analytical Equation
z(x,y,t)=A1sin⁡(k1x+ω1t)cos⁡(k2y+ω2t)+A2sin⁡(k3x2+y2−ω3t)z(x, y, t) = A_1 \sin(k_1 x + \omega_1 t) \cos(k_2 y + \omega_2 t) + A_2 \sin(k_3 \sqrt{x^2 + y^2} - \omega_3 t)
Click to expand
Compact Formula
y = sin(x * 0.02 + t) * cos(y * 0.01 + t * 0.5) * 35 + sin(dist(x, y) * 0.05 - t * 2) * 20

Mathematical Tags

#sin #cos #wave #mesh #organic #trigonometry
Author: Math Art Core Target: 60 FPS

Export & Embed: Organic Wave

4K PNG Snapshot

High-resolution single frame render

WebM Video (5s Loop)

60 FPS browser-captured stream

Standalone JS Script

Complete executable Canvas 2D algorithm

HTML Iframe Embed

<iframe src="https://art.fazleyrabbi.xyz/embed/organic-wave" width="500" height="500" frameborder="0" loading="lazy"></iframe>
ESC
↑↓ Navigate ↵ Select
113 Mathematical Artworks
Made by Fazley Rabbi
☕

Support the Project

Keep mathematical creative coding alive & open source

Or via Direct Payoneer ($0 Fee)
Payoneer Customer ID: $0 Fee Direct
24076084

💡 Payoneer app: Go to Pay → Pay to recipient → Enter ID 24076084.

Thank you for supporting generative mathematical animations! ✨