Add a value to a 3D Array where a 3D Vector passes through said array.

I have a 3D Array that represents an intensity at each location inside the physical volume of a detector, initialized to all zeros.
I also have a set of 3D Vectors (defined by the Start XYZ and End XYZ of each vector) repesenting the tracks of a particle going through that detector.
I would like to add some value to each 3D Array location the 3D Vector passes through.
The 3D vectors are all inside the 3D Array and have the same coordinate system.
I am scratching my head on what would be a good approach to this problem.
For context, what I am trying to do is simulate a cosmic ray passing through a 3D detector and depositing energy along it's track.
Any

댓글 수: 2

Matt J
Matt J 2020년 7월 12일
편집: Matt J 2020년 7월 12일
I would like to add some value to each 3D Array location the 3D Vector passes through.
Does the 3D Vector pass through integer grid locations only? If not you presumably need to define the contribution to each location according to some interpolation rule.
No, it is the binning of the charge into the appropriate pixel that seems to be the tricky part.

댓글을 달려면 로그인하십시오.

답변 (0개)

제품

릴리스

R2019b

질문:

2020년 7월 12일

댓글:

2020년 7월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by