Reflector
Application of the Monge Ampere program to the reflector problem
Install / Use
/learn @simonlegrand/ReflectorREADME
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]
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
