Companion code for the paper "Intersection of Two Conics via Inertia Index Characterization of the Matrix Pencil".
This repository contains complete MATLAB implementations of five algorithms for computing the intersection points of two plane conics, together with Monte Carlo test harnesses for benchmarking.
| File | Method | Reference |
|---|---|---|
intersect_conics_core_opt.m |
Proposed method — inertia-index + truncation | This paper |
intersect_conics_parabola.m |
Parabola extension — projective pre-processing | This paper (Section 7.2) |
intersect_conics_resultant.m |
Classical Bézout/Sylvester resultant | Cox et al. (2007) |
intersect_conics_persson.m |
Lambda Twist (single Newton root) | Persson & Nordberg (2018) |
intersect_conics_adjoint.m |
Adjoint method (Cardano + fallback) | Ding et al. (2023) |
intersect_conics_mancini.m |
Self-polar triangle | Mancini & Christian (2024) |
| File | Description |
|---|---|
intersect_conics_core.m |
Core method using eig() for pencil roots |
intersect_conics_fast.m |
Optimized variant with single-root Newton |
% Two intersecting parabolas
C1 = [1, 0, 0; 0, 0, -1/2; 0, -1/2, 0]; % y = x^2
C2 = [0, 0, -1/2; 0, 1, 0; -1/2, 0, 0]; % x = y^2
points = intersect_conics_parabola(C1, C2);
% Returns: [(0,0), (1,1)]% Two tangent ellipses (the hardest case)
% Our method maintains 100% success where others degrade
points = intersect_conics_core_opt(C1, C2);% Run the parabola validation suite (7 configurations)
test_parabola_intersection
% Run the full experimental comparison (Section 6 of paper)
run_geometric_noise.
├── intersect_conics_core_opt.m # Proposed method (optimized)
├── intersect_conics_core.m # Proposed method (basic)
├── intersect_conics_fast.m # Fast variant
├── intersect_conics_parabola.m # Parabola extension
├── intersect_conics_resultant.m # Classical resultant
├── intersect_conics_persson.m # Lambda Twist
├── intersect_conics_adjoint.m # Adjoint method
├── intersect_conics_mancini.m # Self-polar triangle
├── run_geometric_noise.m # Monte Carlo benchmark harness
├── test_parabola_intersection.m # Parabola validation suite
└── README.md
If you use this code in your research, please cite:
@article{luo2026conic,
title = {Intersection of Two Conics via Inertia Index Characterization of the Matrix Pencil},
author = {Peilin Luo},
journal = {Computer Aided Geometric Design},
year = {2026},
note = {Under review}
}MIT License. See LICENSE for details.