Skip to content

Conversation

@JLBegin
Copy link
Contributor

@JLBegin JLBegin commented Oct 12, 2025

Added detectors for sampling volume simulation and more.

Changes

  • Support photon tracing by logging photon ID during all interactions.
  • Added flat solid Circle and Rectangle.
  • Added Solid.asDetector(halfAngle) to convert any solid to a detector.
  • Implement detectors (capture inside halfAngle or pass through).
  • Implement detectedBy data filters to obtain photon traces that were captured by some detector(s).
  • Added example to showcase sampling volume simulation.

Other

  • prevent use of vtk 9.5 as it is not yet compatible with mayavi.
  • fix rotation bug in GetAxisAngleBetween when orientation changed to opposite direction.
  • fix cuboid hash not taking into account its materials
  • fix photon batching when nWorkUnits > N
  • optimize data export to decrease RAM usage.
  • specify test coverage options

Examples

Any Solid can be used as a detector. A sphere for example (with a wide light source from the left):
Screenshot from 2025-10-12 12-22-54

Included in the simulation stats:

Report of solid 'detector'
  Detected 2.20% of total power

Future improvements

  • Add display/filter options for multi-detectors.
  • Allow detectors to be invisible (no capture) or to block rays outside halfAngle.
  • Add display endpoints to show photon traces.
  • Support filtering data during simulation to minimize memory usage.

@JLBegin JLBegin force-pushed the jlb/detectors-and-tracing branch from 1ffac51 to db2eff4 Compare October 12, 2025 00:58
@JLBegin JLBegin marked this pull request as ready for review October 12, 2025 01:26
@JLBegin JLBegin self-assigned this Oct 12, 2025
@JLBegin JLBegin merged commit 50c4e76 into main Oct 26, 2025
22 checks passed
@JLBegin JLBegin deleted the jlb/detectors-and-tracing branch November 8, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants