fangq / mmc

Mesh-based Monte Carlo (MMC)
Other
40 stars 32 forks source link

Consider adding support for ray files as input source #75

Open Aabaz opened 2 years ago

Aabaz commented 2 years ago

Hello, in addition to currently supported parametric source types (pencil, etc.), would it be possible to consider supporting non-parametric source types in the form of lists of ray's initial position, direction and weight?

Several light source manufacturers make this data available for their products (see for instance Osram: https://www.osram.com/os/applications/optical-simulation-ray-files-package-cad-data/index.jsp) in several formats (for proprietary optics software) including ASCII text.

An example of such a file:

X_Pos      Y_Pos      Z_Pos      X_Vec      Y_Vec      Z_Vec      Flux
-0.1567955 -0.2475255 0.005 -0.7258301 0.5654783 0.3916694 4.5E-005
-0.3374261 -0.01758777 0.005 -0.02799014 -0.2416582 0.9699577 4.5E-005
[...]

This could allow MMC to model light sources that are closer to those used in actual optical sensors.

Best regards,