Eigenmode and wave-field media#

The eigenmode family solves a bounded standing-wave eigenproblem and returns the chord-weighted superposition of the eigenmodes; the wave_field family superposes coherent travelling waves on an unbounded medium.

Same chord set, two very different physics.

import warnings
from fractions import Fraction

import numpy as np
import matplotlib.pyplot as plt

from biotuner.harmonic_geometry import HarmonicInput, plotting

warnings.filterwarnings("ignore")
plt.rcParams["figure.dpi"] = 110

# A small reference set of chord inputs used across the notebook.
CHORDS = {
    "Major": HarmonicInput(ratios=[Fraction(1), Fraction(5, 4), Fraction(3, 2)]),
    "Sus4":  HarmonicInput(ratios=[Fraction(1), Fraction(4, 3), Fraction(3, 2)]),
    "Dom7":  HarmonicInput(ratios=[Fraction(1), Fraction(5, 4),
                                    Fraction(3, 2), Fraction(7, 4)]),
    "Dim7":  HarmonicInput(ratios=[Fraction(1), Fraction(6, 5),
                                    Fraction(7, 5), Fraction(12, 7)]),
}

Eigenmode — RigidPlate across three domains#

from biotuner.harmonic_geometry.media import (
    RigidPlate, ClosedSurface, Elastic, PlasmaLattice,
    Rectangular, Circular, PolygonDomain,
)

geoms = [
    RigidPlate(domain=Rectangular(),               resolution=128)(CHORDS["Dom7"]),
    RigidPlate(domain=Circular(R=1.0),             resolution=128)(CHORDS["Dom7"]),
    RigidPlate(domain=PolygonDomain(n_sides=5),    resolution=96)(CHORDS["Dom7"]),
]
plotting.gallery(geoms,
                 titles=["rectangular", "circular", "pentagon"],
                 n_cols=3,
                 suptitle="RigidPlate (Dom7) across three domains");
../../_images/428a2134e47480adb953eaf82b746520e319361ad359b190fd85d471a77add44.png

Eigenmode — ClosedSurface on a sphere (chord-driven Y_lm modes)#

The default mode_rule='zonal' uses only $(l, 0)$ modes, which have no longitudinal variation — the sphere lights up symmetrically around the poles. The other three rules expose richer chord-dependent geometry:

  • sectoral — uses $|m| = l$ (banana-shaped equatorial lobes)

  • chord_balanced — mixes $m \in {0, ±1, …, ±l}$ across components

  • rounded — rounds $m$ proportional to the ratio magnitude

# Side-by-side comparison: same chord, four mode_rules
sphere_rules = ["zonal", "sectoral", "chord_balanced", "rounded"]
geoms = [ClosedSurface(mode_rule=r, max_l=12,
                        n_theta=96, n_phi=192)(CHORDS["Dom7"])
         for r in sphere_rules]
plotting.gallery(geoms, titles=sphere_rules, n_cols=4,
                 suptitle="ClosedSurface — same chord (Dom7), four mode_rules");
../../_images/12619deccee878904f80a7bc1467b92f2aa03ea1eb88f38e60295e82e92ec07b.png
# Four chords, rendered with the visually richest mode_rule.
sphere = ClosedSurface(mode_rule="chord_balanced", max_l=12,
                       n_theta=96, n_phi=192)
geoms  = [sphere(CHORDS[n]) for n in CHORDS]
plotting.gallery(geoms, titles=list(CHORDS.keys()), n_cols=4,
                 suptitle="ClosedSurface (chord_balanced) — four chords on a sphere");
../../_images/b60a22643f91628d25a2c9d78f74a4a814a1b5ae0071010dfdf9dd0e7151cf1e.png

Eigenmode — Elastic (anisotropy in the wave operator)#

Elastic solves the elastic-wave eigenproblem on a rectangular domain with an optional anisotropy axis. The fundamental mode is then chord-modulated.

elastic = Elastic(resolution=160, n_modes=24)
geoms   = [elastic(CHORDS[n]) for n in CHORDS]
plotting.gallery(geoms, titles=list(CHORDS.keys()), n_cols=4,
                 suptitle="Elastic plate (anisotropic) — four chords");
../../_images/b9565556c40e61596310b61648ad3f1e257ddb0c0063bda950e149ac98c24921.png

Eigenmode — PlasmaLattice (chord-tuned ion crystal)#

A relaxed Coulomb crystal where the trapping potential is modulated by the chord ratios; the medium returns the equilibrium ion positions as a 2-D point cloud.

lattice = PlasmaLattice(n_ions=36, n_steps=200,
                         chord_resolution=128, rng_seed=0)
geoms   = [lattice(CHORDS[n]) for n in CHORDS]
plotting.gallery(geoms, titles=list(CHORDS.keys()), n_cols=4,
                 suptitle="PlasmaLattice — equilibrium ion positions");
../../_images/94ffc2df5332d431faa51a10f70e1dea7ab226c86568009ee1e71d6148ef58c9.png

Wave-field — Interference (five paradigms)#

Interference is a thin facade around the five travelling-wave paradigms exposed in :mod:harmonic_geometry.interference_patterns. The same chord becomes five visually distinct fields.

from biotuner.harmonic_geometry.media import Interference

paradigms = ["harmonic", "quasicrystal", "standing_lattice", "vortex", "sources"]
geoms = [Interference(paradigm=p, resolution=192)(CHORDS["Dom7"])
         for p in paradigms]
plotting.gallery(geoms, titles=paradigms, n_cols=3,
                 suptitle="Interference — five paradigms on the Dom7 chord");
../../_images/d0a94ec684106dc64ef18b190d9c7816e3896e3bd454a9ca91ed04507317648c.png

Wave-field — Acoustic (multi-source pressure field)#

Acoustic places n_sources emitters on a configurable layout (a ring by default), assigns one chord component per source, and superposes the resulting outgoing pressure waves.

from biotuner.harmonic_geometry.media import Acoustic

acoustic = Acoustic(n_sources=5, source_layout="ring", resolution=224,
                    base_frequency=8.0)
geoms = [acoustic(CHORDS[n]) for n in CHORDS]
plotting.gallery(geoms, titles=list(CHORDS.keys()), n_cols=4,
                 suptitle="Acoustic — 5-source ring, pressure field");
../../_images/6ff86c2a8eeac98e98a2ce8ff5394a092f33b466597b045a61d9dec55e642e9d.png