Skip to main content

wave_interference

Function wave_interference 

Source
pub fn wave_interference(
    cx1: f64,
    cy1: f64,
    cx2: f64,
    cy2: f64,
    wavelength: f64,
    amplitude: f64,
    grid_resolution: usize,
    t: f64,
) -> Vec<Value>
Expand description

Wave Interference — Dos fuentes de ondas interfiriéndose

§Args

  • cx1, cy1: centro de fuente 1
  • cx2, cy2: centro de fuente 2
  • wavelength: longitud de onda
  • amplitude: amplitud
  • grid_resolution: resolución de la cuadrícula (10-50)
  • t: tiempo

§Retorna

Array de puntos de la cuadrícula [{x, y, amplitude, color}, …]