- Published on
Interactions #2: The Wave
- Authors

- Name
- Rob
- @x
Prompt
Create an interactive wave animation using p5.js, based on the wave shapes observed in the attached image. Accurately reproduce these shapes in the animation. The waves should exhibit a gentle quivering motion by default, becoming more dynamically animated with ripples in response to touch or mouse input. The visual style should be minimalist, featuring a black background and white waves.

Output: Grok3 Single-Shot in P5.JS
Click or touch to interact with the waves.
Adjusted Output: ChatGPT Multi-Shot in THREE.JS
Click or touch to interact with the waves. Adjust parameters to explore wave behavior.
Explanation of Available Parameters
Wave Count
- What it does: Determines the total number of wave lines drawn across the canvas.
- Impact: A higher count creates a denser wave pattern; a lower count yields a sparser display.
Wave Amplitude
- What it does: Controls the amplitude of the baseline sinusoidal offset applied to each wave line.
- Impact: Larger amplitudes make each wave “wavier,” while smaller values result in a flatter baseline.
Wave Phase
- What it does: Scales the random phase offset (assigned per line) added to the baseline oscillation.
- Impact: Increasing this value makes each wave line’s oscillation more unique and organic.
Ripple Speed
- What it does: Sets how fast each ripple expands outward from the interaction point.
- Impact: Higher values make ripples propagate more quickly across the waves.
Ripple Strength
- What it does: Determines the magnitude of the ripple’s displacement effect on the wave lines.
- Impact: A higher strength yields more dramatic distortions when a ripple occurs.
Spatial Freq
- What it does: Controls the spatial frequency of the ripple effect (how rapidly it oscillates in space).
- Impact: Higher frequencies produce more detailed ripple patterns.
Temporal Freq
- What it does: Controls the temporal evolution of the ripple effect (how quickly the ripple oscillates over time).
- Impact: Larger values cause the ripple’s pattern to change more rapidly over time.