Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

3D Cube of Spheres

Public visualization

Viewing a saved revision (read-only)

c5cd10c76b074dedba7cd155e378d4ae

3D Cube of Spheres

1 star47๐ŸŒ Public
CCurran Kelleher
Last edited May 23, 2025
Created on Mar 19, 2025

This visualization displays a 4x4x4 cube composed of 64 colored spheres, with a hue gradient varying across each axis and a gentle rotation animation over a dark, starry background. The scene is rendered in WebGL using Three.js, featuring perspective projection, directional and ambient lighting, and interactive orbit controls for rotating, zooming, and panning. The code organizes configuration parameters in a separate module and uses `THREE.SphereGeometry`, `MeshPhongMaterial`, and `OrbitControls` to construct and manipulate the 3D environment.

AI-generated description

Earth with Magnetic Field Visualization

This project shows a 3D visualization of Earth with its magnetic field represented by field lines.

Features

  • 3D Earth with realistic texture
  • Magnetic field lines visualized as dipole field emanating from poles
  • Interactive camera controls (rotate, zoom, pan)
  • Earth rotation animation
  • Starry background

Technologies Used

  • Three.js for 3D rendering
  • JavaScript ES modules
  • HTML5 and CSS

How It Works

The magnetic field is represented using dipole field equations that create curved lines from the north pole to the south pole. The field lines follow the mathematical formula: r = C * sinยฒ(ฮธ), which describes how magnetic field lines behave around a dipole magnet (like Earth's core).

The blue marker indicates the north magnetic pole, and the orange marker indicates the south magnetic pole.