Add plane-based interception method for SBR ray tracing with plane fusion#367
Add plane-based interception method for SBR ray tracing with plane fusion#367
Conversation
Co-authored-by: jeertmans <[email protected]>
Co-authored-by: jeertmans <[email protected]>
Co-authored-by: jeertmans <[email protected]>
Co-authored-by: jeertmans <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #367 +/- ##
===========================================
- Coverage 84.77% 34.20% -50.58%
===========================================
Files 32 4 -28
Lines 3021 538 -2483
===========================================
- Hits 2561 184 -2377
+ Misses 460 354 -106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot For your information, the |
Co-authored-by: jeertmans <[email protected]>
Done in commit 1f9c67b:
|
|
@copilot Now create a method inside the |
Co-authored-by: jeertmans <[email protected]>
Done in commit accd6c3. Added
Tested with both scalar altitude (2 planes) and custom multi-plane configurations. |
|
@copilot Actually, I double checked and you were correct: the Second, the Third, still inside |
Co-authored-by: jeertmans <[email protected]>
Done in commit 9435f0b.
Verified that final vertices are at triangle mesh intersections (not all at plane altitude). |
|
@copilot Please add tests for the |
Co-authored-by: jeertmans <[email protected]>
Done in commit ff010f3. Added comprehensive tests for
Also updated type hint overloads for |
Description
Implements plane-based ray interception for SBR (Shooting and Bouncing Rays) method. Instead of detecting rays near predefined receiver positions using spheres, this records ray interception coordinates on specified planar surfaces, enabling post-processing interpolation of received power anywhere within the reception surface.
Core Changes
Renamed
_compute_paths_sbr→_compute_paths_sbr_spheresfor clarityAdded
_compute_paths_sbr_planesfunction that:[num_tx, num_planes, num_rays, order+2, 3]Extended
compute_pathsmethod with two parameters:interception_method: Literal["sphere", "plane"](default:"sphere")interception_planes: accepts scalar (z-altitude) or array[num_planes, 3, 3]interception_method != 'plane'ormethod != 'sbr'Updated
viewing_frustumintegration:active_verticesparameter support usingjnp.repeat(mesh.mask, 3)Added
fuse_planes()method toSBRPathsclass:[..., num_planes, num_rays, ...]to[..., num_rays, ...]take_along_axisfor efficient gatheringImplementation Details
The plane-based method works by:
world_verticesso rays can aim at planesUsage
Checklist
Note to reviewers
Backward compatible—default behavior unchanged. Tests cover scalar/array plane specifications, validate that interception coordinates are at triangle mesh intersections (not plane intersections), and verify plane fusion logic with comprehensive test suite. CodeQL scan clean. Uses
jnp.repeat(mesh.mask, 3)for active vertices mask construction for improved readability. Thefuse_planes()method enables efficient post-processing by consolidating multi-plane results. Type annotations updated across allcompute_pathsoverloads for complete type safety.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.