Illumination Performance Optimizations
What's Changed
Performance Features
- Face Maximum Elevation Optimization: ~2.5-2.7x speedup for illumination calculations with self-shadowing (#46)
- Automatically computed when
with_face_visibility=true - Skips ray tracing for faces that cannot cast shadows based on pre-computed elevation angles
- Results match exactly with the original implementation
- Automatically computed when
Enhancements
- Improved Eclipse Detection: More accurate total eclipse detection for non-spherical shapes (#45)
- New Ray-Sphere Utilities: Added
intersect_ray_spherefunction and related types for cleaner geometric calculations (#45)
Documentation
- Added comprehensive Migration Guide
- New benchmark results documenting performance improvements
- Updated README with "What's New" section
Benchmark Results
For Ryugu 49k model with 72 sun positions (5° rotation steps):
- Pseudo-convex: 7.2 ms
- Self-shadowing (without optimization): 1.08 s
- Self-shadowing (with optimization): 399.1 ms (~2.7x faster)
Optimization effectiveness: 10.7% of ray tracing computations skipped
Migration
No breaking changes. Your existing code will automatically benefit from the performance improvements. See the Migration Guide for details.
Full Changelog: v0.4.1...v0.4.2