GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SpaceEngineerSS/PhotonLab: PhotonLab FDTD Electromagnetic Simulator

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
rust-core
rust-core
 
 
scripts
scripts
 
 
tools
tools
 
 
web
web
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.json
.prettierrc.json
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
playwright.config.ts
playwright.config.ts
 
 
vercel.json
vercel.json
 
 

Repository files navigation

PhotonLab

A real-time electromagnetic wave simulator that runs in the browser.

Draw a lens, a slit or a waveguide, switch on a source, and watch Maxwell's equations play out live. Underneath is a 2D finite-difference time-domain (FDTD) solver written in Rust and compiled to WebAssembly. It runs on its own thread, so the interface stays smooth on laptops, tablets and phones.

Open the app · Documentation · Türkçe belgeler

PhotonLab running the double-slit experiment

What it does

  • Solver. TM and TE polarization, a convolutional PML that reflects 87 dB below the incident wave, one-way plane waves and Gaussian beams (total-field / scattered-field), mirror and periodic boundaries, dielectrics, perfect conductors, and Drude metals (silver, gold) with surface plasmons.
  • Drawing. Brush, line, rectangle, ellipse and polygon tools. Glass, water, silicon, metals, an absorber, or any refractive index you choose.
  • Sources. Point sources, plane waves, Gaussian beams and phased arrays. Continuous waves, pulses or wave packets.
  • Measurement. Up to eight probes that record every time step, with signal, spectrum and energy plots. A resolution readout warns you when the grid is too coarse for the material.
  • Sharing. Undo history, scene files, share links that carry the whole scene, PNG, video and CSV export.
  • Twelve experiments to start from: double slit, lens, parabolic mirror, total internal reflection, zone plate, anti-reflection coating, silicon waveguide, photonic crystal, surface plasmons, phased array and more.
  • Runs anywhere. A start-up benchmark picks a grid size the device can carry. Installable as an offline app. English and Turkish.

The solver is checked against known results on every commit: Fresnel reflection from glass and silicon, metal reflection, energy conservation in a closed cavity, boundary reflection and plane-wave leakage. The numbers are in the validation page.

Running it locally

Requires Node.js 20.19 or newer.

npm install
npm run dev          # app on http://localhost:5173
npm run dev:docs     # docs on http://localhost:4321/docs
npm test             # web unit tests

The compiled solver is committed in rust-core/pkg, so Rust is only needed to change the solver:

rustup target add wasm32-unknown-unknown && cargo install wasm-pack
npm run build:wasm
cd rust-core && cargo test --release

See Building and contributing for the details and Architecture for how the pieces fit together.

Project layout

rust-core/   FDTD solver (Rust → WebAssembly) and its physics tests
web/         the app (React, TypeScript, Vite, WebGL 2)
docs/        documentation site (Astro Starlight), English and Turkish
tools/       screenshot, figure and icon generators

Contributing

Bug reports, ideas and pull requests are welcome. Please read CONTRIBUTING.md first. Changes are listed in CHANGELOG.md.

License

MIT © Mehmet Gümüş. See LICENSE.

About

PhotonLab FDTD Electromagnetic Simulator

photonlab-gamma.vercel.app

Topics

ftdtmethodphysics-simulationreactrustwebassembly

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.