Skip to main content
Public

Share visualization

Loading preview…

Plucked-String Spheres with Varied Drum Synthesis

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Viewing a saved revision (read-only)

GTeYrE5v_uDHrswP7gECC

Plucked-String Spheres with Varied Drum Synthesis

0
CCurran Kelleher
Last edited Nov 12, 2026
Created on Nov 11, 2026

This interactive WebGL visualization displays a 4×4×4 cube of spheres with warm orange color variations. Each sphere uses Three.js MeshPhongMaterial with randomly varied HSL saturation and lightness values, creating a subtle gradient effect. The entire cube group rotates continuously in both the x and y axes through the animation loop, while OrbitControls allows users to zoom and pan around the structure. The scene uses 64 individually positioned spheres, rendered with directional and ambient lighting for depth.

Bouncing Balls Cube

A Three.js visualization of a 4×4×4 grid of orange spheres that bounce around inside an invisible bounding box. Each sphere has independent physics — gravity pulls them down, they collide with the walls of the box, and they bounce with energy damping. Drag with the mouse to orbit the camera.

Structure

  • index.html - HTML entry point with import map for Three.js
  • main.js - Animation loop and setup orchestration
  • config.js - Tunable constants (radius, spacing, physics)
  • scene.js - Scene creation and lighting
  • sphereCube.js - Creates the cube of spheres and their physics state
  • simulation.js - Per-frame physics update (gravity, walls, collisions)
  • renderer.js - WebGL renderer setup
  • camera.js - Perspective camera setup
  • controls.js - OrbitControls setup

Physics

Each sphere has a position and velocity vector. Every frame:

  1. Gravity is applied to the vertical velocity.
  2. Velocity is dampened.
  3. Position is advanced by velocity.
  4. Wall collisions reflect velocity and dampen energy.
  5. Sphere-sphere collisions apply a repulsion impulse.
MIT Licensed