Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

575 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

A Collection of Simulators

A collection of interactive simulators designed to explore various concepts in physics, with a focus on crystallography, materials science, and optics. These tools were developed using HTML and JavaScript, with the Three.js library for 3D visualizations.

  • Author: NitaD, UniversitΓ© Paris-Saclay
  • Versions: 2007-2025
  • Last Updated: August 8, 2025

Simulators Overview

Simulator Description
🌊 WaveXplorer Visualizing simple concepts of waves.
πŸ’Ž Directions and Miller Planes Viewer Visualize directions or crystallographic planes.
πŸ“„ Pair Distribution Function Explorer An interactive simulation to explore the Pair Distribution Function (PDF), g(d), for various 2D particle arrangements.
🌐 2D Space groups Symmetry and positions in the 2D space groups.
↔️ Reciprocal Space Viewer Visualization of a reciprocal lattice for all crystal systems.
βš›οΈ Atomic Energy Levels Schematically displays atomic energy levels (K, L, M).
πŸ“ˆ XRD Emission Spectra Generates and displays X-ray emission spectra.
πŸ“Š XRD Absorption & Filters Simulates the effect of a filter on an X-ray spectrum.
✨ XRD Monochromators Simulates the effect of a single crystal monochromator on an X-ray spectrum.
🌍 Ewald Sphere Viewer Visualizes the Ewald sphere construction in reciprocal space.
πŸ”¬ Diffraction Methods Visualizes different experimental diffraction methods.
πŸ–₯️ Single Crystal Diffraction Advanced simulator for single-crystal X-ray diffraction.
✨ 2D diffraction Diffraction patterns of 2D structures.
πŸ”„ Patterson function Demonstrates the relationship between a crystal structure, its diffraction pattern, and the Patterson function.
🎞️ Kiessig Fringes Demonstrates X-ray Reflectivity (XRR) for a single film.
✨ 2D Fourier Transform Visualizes the 2D Fourier Transform of various sources.
πŸ”„ 2D Radon Transform Computes and displays the 2D Radon Transform (Sinogram).
🎨 Color Radon Transform Explorer for the 2D Radon Transform on color images.
🧊 3D Radon Transform A 3D explorer for computed tomography.
✍️ 2D Hough Transform An interactive explorer for line detection in images.

Simulator Details

🌊 1. WaveXplorer - Wave Phenomena Explorer

Launch WaveXplorer

WaveXplorer is a versatile tool for visualizing and understanding various fundamental concepts of waves.

  • Concepts Covered:
    • Wavelength & Amplitude: Visualize a sinusoidal wave with adjustable parameters.
    • Phase (Phase Shift): Compare two waves with an adjustable phase difference.
    • Polarization: Illustrates linear (vertical, horizontal), circular (right, left), elliptical, and unpolarized light, with temporal and spatial viewing modes.
    • Poynting Vector: Schematic representation of an electromagnetic wave and the direction of the Poynting vector.
    • Phase/Group Velocity: Simulate a single wave (phase velocity) or a wave packet (phase and group velocities) with an adjustable dispersion factor.
    • Wave Type (Comparison): Animate particles to illustrate transverse and longitudinal waves.
    • Wavefront: Visualize plane and spherical wavefronts.

πŸ’Ž 2. Directions and Miller Planes Viewer

Launch Directions and Miller Planes Viewer

Visualize (hkl) crystallographic planes and [uvw] crystallographic directions within a unit cell.

  • Features (Miller Planes):
    • Displays three successive planes.
    • Shows nodes with systematic extinctions.
    • Calculates interplanar distances.
  • Features (Directions):
    • Choose from the 7 crystal systems (Cubic to Triclinic).
    • Select the appropriate lattice centering (P, I, F, C, R).
    • Interactively set the [uvw] direction indices.
    • Displays the unit cell, lattice nodes, and the direction vector.

πŸ“„ 3. Pair Distribution Function Explorer

Launch PDF Explorer

An interactive simulation to explore the Pair Distribution Function (PDF), g(d), for various 2D particle arrangements.

  • Concepts Covered:
    • Particle Distribution: Generate and visualize different 2D arrangements of particles, including crystalline, liquid-like, gaseous, and liquid crystal states.
    • Pair Distribution Function g(d): Calculates and plots the g(d) function, which describes the probability of finding a particle at a certain distance from a reference particle.
    • Short-Range vs. Long-Range Order: Observe the distinct features of the g(d) for different states of matter, from the sharp peaks of a crystal to the broad humps of a liquid and the flat line of a gas.
  • Interactive Controls:
    • Presets: Choose from different structural models: Crystal, Compact Crystal, Liquid-like, Gas, and Smectic Liquid Crystal.
    • Particle Count: Adjust the number of particles in the simulation box.
    • Disorder: Introduce thermal-like random displacements to the particle positions.
    • Click to Add: Manually add particles to the distribution.
    • Distance Highlighting: A slider interactively highlights a specific distance on both the particle distribution and the g(d) plot.

🌐 4. 2D Space groups

Launch 2D Space groups Simulator

A tool for visualizing symmetry and positions in the 2D space groups.


↔️ 5. Reciprocal Space Viewer

Launch Reciprocal Space Simulator

This tool allows for the visualization of a reciprocal lattice for all crystal systems.

  • Features:
    • Choose the crystal system and centering.
    • Shows systematic extinctions.
    • Explore hkl indices and distances between nodes.

βš›οΈ 6. Atomic Energy Level Diagram

Launch Atomic Levels Simulator

This viewer schematically displays atomic energy levels (K, L, M) for different elements and allows visualization of common electronic transitions (KΞ±, KΞ², LΞ±, etc.).

  • Features:
    • Select an element (H, He, Mn, Fe, Co, Ni, Cu, Zn, Mo, Au).
    • Choose an energy transition (KΞ±1, KΞ±2, KΞ²1, LΞ±1, LΞ²1).
    • Display energy levels (in eV or keV) and the selected transition.
    • Calculate and display the energy and wavelength of the photon emitted during the transition.
    • Shows the selection rules for electric dipole transitions.

πŸ“ˆ 7. XRD Emission Spectra Simulator

Launch Emission Simulator

This simulator generates and displays X-ray emission spectra, including Bremsstrahlung radiation and characteristic lines.

  • Features:
    • Choose the anode element (Sc to Zn).
    • Adjust the accelerating voltage and tube current.
    • Display the resulting emission spectrum (intensity vs. wavelength/energy).
    • Overlay multiple spectra for comparison.
    • Click near a characteristic line on the main spectrum to display a tooltip with a schematic diagram of the corresponding electron transition (K, L, M).

πŸ“Š 8. XRD Absorption and Filters Simulator

Launch Filters Simulator

This tool simulates the X-ray emission from an anode, the effect of a filter on the spectrum, and displays the filter's mass absorption coefficient.

  • Features:
    • Choose the anode element (Sc to Zn).
    • Set the acceleration voltage and tube current.
    • Select the filter element and its thickness.
    • Display the initial emission spectrum (Bremsstrahlung and characteristic K and L lines).
    • Display the mass absorption coefficient (ΞΌ/ρ) of the filter versus wavelength/energy (linear or logarithmic scale).
    • Display the spectrum after filtering.

✨ 9. XRD Monochromators

Launch XRD Monochromators Simulator

This tool simulates the effect of a single crystal monochromator on an X-ray spectrum.


🌍 10. Ewald Sphere and XRD Viewer

Launch Ewald Sphere Simulator

This simulator visualizes the construction of the Ewald sphere in reciprocal space for an orthorhombic lattice.

  • Features:
    • Define orthorhombic lattice parameters (a, b, c).
    • Select the X-ray wavelength (Ξ»).
    • Choose the Bravais lattice type (Primitive, Body-Centered, Face-Centered, Base-Centered).
    • Rotate the crystal (and thus the reciprocal lattice) around the X, Y, and Z axes.
    • Adjust a disorder level to simulate the broadening and attenuation of diffraction spots.
    • Identify points in diffraction condition (intersection with the sphere).
    • Click on a point in diffraction to calculate its 2ΞΈ angle.

πŸ”¬ 11. Experimental Diffraction Methods

Launch Diffraction Methods Simulator

This software visualizes the reciprocal lattice for three different experimental diffraction methods.

  • Features:
    • Choose between single-crystal and powder diffraction methods.
    • Shows systematic extinctions.
    • Explore hkl indices and distances between nodes.

πŸ–₯️ 12. Single Crystal Diffraction Simulator

Launch Single Crystal Simulator

An advanced simulator for visualizing single-crystal X-ray diffraction. It combines a 3D view of the reciprocal lattice and Ewald sphere with a 2D detector view of the resulting diffraction pattern.

  • Features:
    • Supports all 7 crystal systems and their corresponding Bravais lattices.
    • Interactive controls for lattice parameters, crystal orientation, and X-ray wavelength.
    • 3D visualization of the reciprocal lattice, Ewald sphere, and diffraction vectors.
    • 2D detector panel showing the projected diffraction pattern.
    • Interactive detector with zoom (mouse wheel/pinch) and pan (left-click drag/two-finger drag) controls.
    • Click on spots in the detector view to identify (h,k,l) indices and highlight the corresponding point in the 3D view.
    • Option to show all reciprocal lattice points or only those in a diffraction condition.

✨ 13. 2D diffraction

Launch 2D diffraction Simulator

A visualization tool for displaying diffraction patterns of 2D structures.


πŸ”„ 14. Patterson function

Launch Patterson function Simulator

This tool demonstrates the relationship between a crystal structure, its diffraction pattern, and the Patterson function.


🎞️ 15. Kiessig Fringes Simulator

Launch Kiessig Fringes Simulator

This simulator interactively demonstrates X-ray Reflectivity (XRR) for a single film with interface roughness. The footer of the program notes it uses the Parratt formalism with NΓ©vot-Croce roughness.

  • Features:
    • Adjust the film's thickness.
    • Define electron density for the film and substrate.
    • Set the roughness for the top surface (σ₀₁) and the film/substrate interface (σ₁₂).
    • Calculates and displays the reflectivity curve.

✨ 16. 2D Fourier Transform Explorer

Launch FT Explorer

This explorer visualizes the 2D Fourier Transform of various sources.

  • Features:
    • Input can be from an uploaded image, a live webcam feed, or a user-defined function.
    • The transform is calculated using a Radix-2 Fast Fourier Transform (FFT) algorithm.
    • The resulting magnitude is displayed using a logarithmic scale.

πŸ”„ 17. 2D Radon Transform Explorer

Launch Radon Explorer

This tool computes and displays the 2D Radon Transform (Sinogram) of an image.

  • Features:
    • Input can be from an uploaded image, a live webcam feed, or a preset phantom image.
    • Includes a variety of presets such as the Shepp-Logan phantom, circles, squares, and points.

🎨 18. Color Radon Transform Explorer

Launch Color Radon Explorer

An interactive explorer for the 2D Radon Transform on color images, demonstrating filtered back-projection for tomographic reconstruction.

  • Features:
    • Input from uploaded images, webcam, or presets with transparent backgrounds.
    • Performs truly independent transforms on the R, G, and B color channels.
    • Calculates and displays the sinogram for each channel.
    • Implements the inverse Radon Transform to reconstruct the image.
    • Includes an interactive "Filtered Back-Projection" option to demonstrate its importance in creating a clear reconstruction.
    • Features a color Venn diagram preset to test channel independence and color mixing.

🧊 19. 3D Radon Transform Explorer

Launch 3D Radon Explorer

An interactive explorer for visualizing the principles of computed tomography (CT) in three dimensions. It demonstrates how a 3D object can be reconstructed from a series of 2D projections (slices).

  • Features:
    • 3D Visualization: Displays the original 3D phantom and the reconstructed 3D object side-by-side for comparison.
    • Interactive Slicing: Users can select the number of 2D slices to generate from the 3D object.
    • Slice and Sinogram View: Shows the currently selected 2D slice and its corresponding Radon transform (sinogram).
    • Preset Objects: Includes several built-in 3D phantoms like a sphere, cube, and torus.
    • Parallel Processing: Utilizes Web Workers to perform the Radon transforms on multiple slices in parallel, improving performance.
    • Filtered Back-Projection: Implements the filtered back-projection algorithm to reconstruct the 3D object from the sinograms.

✍️ 20. 2D Hough Explorer

Launch Hough Explorer

An interactive explorer for visualizing the principles of the Hough Transform for line detection in 2D images.

  • Features:
    • Input Source: Choose from a variety of preset patterns (e.g., simple lines, square, circle, Sudoku grid) or upload your own image.
    • Hough Space Visualization: Displays the accumulator array (Hough space) in the (ρ, ΞΈ) parameter space.
    • Interactive Detection: An adjustable threshold slider to control the sensitivity of line detection.
    • Linked Visualizations: Interactively sweep through projection angles (ΞΈ) to see the corresponding projection axis on the source image and the profile in Hough space.
    • Edge Detection: Automatically applies a Sobel filter to the source image to detect edges before applying the transform.
    • Results: Shows the final detected lines overlaid on a black background.

Feel free to contribute or report issues!

About

JS

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages