Add a value to a 3D Array where a 3D Vector passes through said array.
Show older comments
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 Comments
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.
MITgnome
on 13 Jul 2020
Answers (0)
Categories
Find more on Coordinate Reference Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!