Remove Gaussian/SciPy (PR #11), restore strict MATLAB-faithful H-kernel implementation - #12
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Revert Gaussian behavior from PR #11 for strict MATLAB compliance
Remove Gaussian/SciPy (PR #11), restore strict MATLAB-faithful H-kernel implementation
Jul 16, 2026
QL-UoHull
marked this pull request as ready for review
July 16, 2026 22:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #11 replaced the intended MATLAB construction with an isotropic Gaussian boundary integral using
scipy.special.ndtr, which has no equivalent in any MATLAB source file and incorrectly renderednas a no-op. This PR reverts that substitution and implements the correct MATLAB-derived evaluator.Core mathematical change
The public evaluator
imp_spline_2dnow uses the H-kernel boundary integral — derived from MATLABH.mvia Green's theorem:deltaandnmatch MATLABH.msemantics exactly; field is C^(n−1)MATLAB-to-Python primitive mapping
H.mH(t, delta, n)Lxy.m/Lxy00.mlxy(...)/lxy00(...)Point_imp.mpoint_imp(...)LineSeg_imp.mline_seg_imp(...)L_corner_inter.ml_corner_inter(...)U_Angle_inter.mu_angle_inter(...)Square_Angle_inter.msquare_angle_inter(...)ImpSpline2D.mconvex_product_spline_2d(...)Key fixes
core.py: Removedscipy.special.ndtr; replaced with H-kernel boundary integral. All MATLAB primitives ported with source-file citations. Default quadrature order raised 16 → 96 (the narrow compact support of H′ requires sufficient GL nodes to avoid ~66% integration error on large polygons).requirements.txt: Removedscipy>=1.7.__init__.py: Exports all new MATLAB primitives; version → 0.2.0.tests/: Removed 3 Gaussian-specific tests (rotation invariance, C^∞ contour sharpness, grid refinement). Added MATLAB parity tests for every primitive and C^(n−1) smoothness validation consistent with MATLAB's claimed behaviour.