Skip to content

Application of the Monge Ampere program to the reflector problem

Notifications You must be signed in to change notification settings

simonlegrand/reflector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reflector

This program is designed to compute the shape of a reflector surface which transforms a given beam of light into a specified output intensity.

Dependencies

  • MongeAmpere/PyMongeAmpere
  • numpy 1.9
  • matplotlib 1.4
  • pillow
  • mpi4py (optionnal)

Dependencies installation

numpy, matplotlib, pillow and mpi4py are available via the python package manager pip:

sudo pip install numpy matplotlib pillow mpi4py

For MongeAmpere et PyMongeAmpere, follow the instructions here

Run the program

python reflecteur.py [-h] [--f f]

optional arguments:

-h, --help         show this help message and exit
--f f, --file f	   parameter file

Default source is a uniform square and default target is a uniform triangle with 10000 diracs.

Warning

The algorithm used to solve the semi-discrete Monge-Ampere equation only works for a convex source density.

Parallel version

reflecteurMPI.py is a parallelized version of reflecteur.py. The ray tracing is the only function parallelized, it is useless to run it if you are not concerned by the resimulation of the reflector. The command to run the program is:

mpirun -n <nbofprocess> python reflecteurMPI.py [-h] [--f f]

About

Application of the Monge Ampere program to the reflector problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages