Overview

The Electromagnetic Spectrum Explorer is an interactive web application that enables users to explore the full electromagnetic spectrumβ€”from radio waves with wavelengths measured in kilometers to gamma rays with wavelengths smaller than atoms. Built with modern web technologies, it provides an intuitive, educational interface for understanding the relationships between wavelength, frequency, and energy across the entire spectrum.

Educational Mission

This tool makes complex physics concepts accessible through:

  • Interactive Visualization: Explore the spectrum with smooth, responsive controls
  • Real-Time Calculations: See how wavelength, frequency, and energy relate
  • Scientific Accuracy: Based on NIST physical constants
  • Educational Content: Learn about each region of the spectrum

Features

πŸ“Š Interactive Spectrum Visualization

  • Logarithmic Scale: Navigate 20+ orders of magnitude smoothly
  • Color-Coded Regions: Visual distinction between spectrum regions
  • Smooth Animations: Fluid transitions powered by Framer Motion
  • Responsive Design: Works on desktop, tablet, and mobile

πŸ”’ Real-Time Unit Conversion

Wavelength Units:

  • Kilometers (km)
  • Meters (m)
  • Centimeters (cm)
  • Millimeters (mm)
  • Micrometers (ΞΌm)
  • Nanometers (nm)
  • Angstroms (Γ…)
  • Picometers (pm)

Frequency Units:

  • Hertz (Hz)
  • Kilohertz (kHz)
  • Megahertz (MHz)
  • Gigahertz (GHz)
  • Terahertz (THz)
  • Petahertz (PHz)
  • Exahertz (EHz)

Energy Units:

  • Electron volts (eV)
  • Kiloelectron volts (keV)
  • Megaelectron volts (MeV)
  • Joules (J)

🌈 Spectrum Regions

Explore seven distinct regions:

  1. Radio Waves (> 1 m)

    • AM/FM radio, television, cell phones
    • Wavelengths from kilometers to meters
  2. Microwaves (1 mm - 1 m)

    • Microwave ovens, radar, satellite communications
    • WiFi and Bluetooth frequencies
  3. Infrared (700 nm - 1 mm)

    • Heat radiation, night vision, remote controls
    • Near, mid, and far infrared
  4. Visible Light (380 nm - 700 nm)

    • The only region visible to human eyes
    • Colors from violet to red
  5. Ultraviolet (10 nm - 380 nm)

    • Sunburn, sterilization, black lights
    • UV-A, UV-B, UV-C classifications
  6. X-Rays (0.01 nm - 10 nm)

    • Medical imaging, security scanners
    • Soft and hard X-rays
  7. Gamma Rays (< 0.01 nm)

    • Nuclear reactions, cosmic radiation
    • Highest energy electromagnetic radiation

🎯 Educational Features

  • Region Information: Detailed descriptions of each spectrum region
  • Real-World Applications: Practical uses of each wavelength range
  • Physical Constants: Based on NIST standard values
  • Scientific Accuracy: Precise calculations using fundamental physics

Technical Implementation

Built With Modern Web Technologies

  • React 18: Modern component architecture with hooks
  • Vite: Lightning-fast build tool and dev server
  • D3.js: Powerful data visualization library
  • Styled Components: CSS-in-JS styling
  • Framer Motion: Smooth animations and transitions

Physics Calculations

All calculations use fundamental physical constants:

// Speed of light (NIST value)
c = 299,792,458 m/s

// Planck's constant (NIST value)
h = 6.62607015 Γ— 10⁻³⁴ Jβ‹…s

// Relationships
frequency = c / wavelength
energy = h Γ— frequency

Architecture

User Interface
     ↓
React Components
     ↓
State Management (useState, useEffect)
     ↓
Physics Calculations
     ↓
D3.js Visualization
     ↓
Styled Components (CSS)

User Interface

Main Controls

  • Wavelength Slider: Logarithmic scale covering the full spectrum
  • Unit Selector: Choose preferred units for display
  • Region Indicator: Shows current spectrum region
  • Value Display: Real-time wavelength, frequency, and energy

Visualization

  • Spectrum Bar: Color-coded representation of all regions
  • Current Position: Indicator showing selected wavelength
  • Region Labels: Clear labeling of spectrum divisions
  • Responsive Layout: Adapts to screen size

Use Cases

For Students

  • Physics Education: Understand electromagnetic radiation
  • Chemistry: Learn about atomic and molecular spectroscopy
  • Astronomy: Explore cosmic radiation and observations
  • Engineering: Study communication frequencies

For Educators

  • Teaching Tool: Interactive demonstrations in class
  • Homework Aid: Visual reference for students
  • Curriculum Support: Supplement textbook material
  • Remote Learning: Accessible online resource

For Professionals

  • Quick Reference: Look up wavelength/frequency conversions
  • Communication Planning: Identify frequency bands
  • Research: Understand spectral regions for experiments
  • Technical Writing: Accurate spectrum information

Getting Started

Live Demo

Visit the live application: Electromagnetic Spectrum Explorer

Local Development

# Clone repository
git clone https://github.com/cameronrye/electromagnetic-spectrum-explorer.git
cd electromagnetic-spectrum-explorer

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Example Use Cases

Scenario 1: Student Learning

A physics student wants to understand the relationship between wavelength and frequency:

  1. Move the slider to the visible light region
  2. Observe the wavelength (e.g., 550 nm - green light)
  3. See the corresponding frequency (545 THz)
  4. Note the energy (2.25 eV)
  5. Understand how these values relate

Scenario 2: Engineer Planning

A wireless engineer needs to check WiFi frequencies:

  1. Navigate to the microwave region
  2. Find 2.4 GHz (12.5 cm wavelength)
  3. Compare with 5 GHz (6 cm wavelength)
  4. Understand propagation characteristics

Scenario 3: Astronomy Enthusiast

An amateur astronomer wants to learn about cosmic radiation:

  1. Explore the gamma ray region
  2. Learn about high-energy cosmic events
  3. Compare with visible light observations
  4. Understand multi-wavelength astronomy

Scientific Accuracy

Physical Constants (NIST)

  • Speed of Light: 299,792,458 m/s (exact)
  • Planck’s Constant: 6.62607015 Γ— 10⁻³⁴ Jβ‹…s (exact)
  • Electron Volt: 1.602176634 Γ— 10⁻¹⁹ J (exact)

Calculation Precision

  • Double-precision floating-point arithmetic
  • Proper handling of extreme values (10⁻¹⁡ to 10⁢ meters)
  • Logarithmic scaling for smooth navigation
  • Unit conversion with full precision

Development

Project Structure

src/
β”œβ”€β”€ components/        # React components
β”‚   β”œβ”€β”€ SpectrumVisualization.jsx
β”‚   β”œβ”€β”€ Controls.jsx
β”‚   └── InfoPanel.jsx
β”œβ”€β”€ utils/            # Physics calculations
β”‚   β”œβ”€β”€ constants.js
β”‚   └── conversions.js
β”œβ”€β”€ styles/           # Styled components
└── App.jsx           # Main application

Testing

# Run tests
npm test

# Run with coverage
npm run test:coverage

# E2E tests
npm run test:e2e

Code Quality

  • ESLint: Code linting and style enforcement
  • Prettier: Consistent code formatting
  • TypeScript: Type checking (optional)
  • Husky: Pre-commit hooks

Accessibility

  • Keyboard Navigation: Full keyboard support
  • Screen Readers: ARIA labels and semantic HTML
  • Color Contrast: WCAG AA compliant
  • Responsive Design: Works on all devices

Browser Support

  • Chrome/Edge: Full support (latest 2 versions)
  • Firefox: Full support (latest 2 versions)
  • Safari: Full support (latest 2 versions)
  • Mobile: iOS Safari, Chrome Mobile

Future Enhancements

  • 3D Visualization: Interactive 3D spectrum representation
  • Spectral Lines: Show atomic and molecular absorption/emission lines
  • Historical Timeline: Evolution of spectrum understanding
  • Quiz Mode: Educational testing and learning
  • Custom Regions: User-defined spectrum regions
  • Export Features: Save visualizations and data

Educational Resources

The application includes links to:

  • NIST Physical Constants: Official reference values
  • NASA Spectrum Guide: Educational materials
  • Physics Textbooks: Recommended reading
  • Research Papers: Advanced topics

Community Impact

This project enables:

  • Free Education: Accessible physics learning tool
  • Visual Learning: Understand abstract concepts through interaction
  • Scientific Literacy: Promote understanding of electromagnetic radiation
  • Open Source: Contribute to educational technology

Acknowledgments

  • NIST: Physical constants and standards
  • D3.js Community: Visualization library
  • React Team: Modern web framework
  • Physics Educators: Inspiration and feedback

Status: Production Ready
License: MIT
Maintained: Active Development