Skip to content

jupfi/mcmphoton

Repository files navigation

mcmphoton

A Monte Carlo simulation of photons in a medium

Duck looking at the simulation (not a real example!)

This is a simple Monte Carlo simulation of photons in a medium. The photons are emitted from a point source and travel in a medium with a given refractive index. The photons are scattered by the medium and the simulation stops when the photons are absorbed by the medium.

How to run this project (under linux)

  1. Clone the repository and cd into it.
  2. Create a virtual environment:
    python -m venv venv
  3. Activate the virtual environement:
    . venv/bin/activate
  4. Install the module:
    pip install .
  5. Run the example:
    python examples/example_1.py
  6. After a few seconds (depending on your system) you should see the simulation result :-).

Requirements

  • python 3.8 or later
  • numpy
  • matplotlib
  • sympy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages