Small math and physics experiments, simulations, and visualizations that I did because curiosity or fun. This repo is a playground for testing ideas: stochastic processes, numerical integration, optics, sampling, quantum-inspired numerics, and a few supporting math utilities.
src/brownian/Brownian motion experiments in 1D and 3D, plus scripts for generating animations.src/mh/Metropolis-Hastings sampling with a Gaussian target and a lightweight sampler implementation in PyTorch.
src/integrals/line_integral.pyNumerical line integral along a parametric curve.src/integrals/riemann.pyRiemann-sum and trapezoidal integration experiments, with derivative and cumulative-integral plots.src/integrals/surface_integral.pyMore structured numerical surface-integral code for scalar surface integrals and flux through parametric surfaces.
src/optics/refraction.pyRefraction at a planar interface via Snell's law, including static plots and GIF animation.src/optics/Also contains rendered outputs such asrefraction.pngandtir.gif.
src/dft/dft.pyA finite-difference density-functional toy model for hydrogen-like radial states.
src/physical/spherical_armonics/main.pyLegendre and associated Legendre polynomial experiments connected to spherical harmonics.src/physical/magnetic_field/main.pyEarly magnetic-field utilities based on point or wire geometry.src/experimental_magnetic_field/main.pySimple plotting of experimental magnetic-field versus current data.
src/descompositions/main.pyGram-Schmidt orthonormalization, QR-style reconstruction, and reconstruction error checks.
src/kans/main.pyA scratch implementation of a Kolmogorov-Arnold Network style layer trained on a toy regression task.
src/matplotlib/main.pyPlotting helpers for heat-equation style comparisons, errors, scalar fields, and 3D views.
src/async/async.pySmall async vs threading comparison for I/O-bound tasks.
src/a.ipynbNotebook workspace for ad hoc exploration.
Some experiments use extra scientific or ML dependencies such as numpy, matplotlib, scipy, and torch as usual, so get fun!