Skip to content

Repository files navigation

Conic Intersection via Inertia Index Characterization

MATLAB License

Companion code for the paper "Intersection of Two Conics via Inertia Index Characterization of the Matrix Pencil".

Overview

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.

Algorithms

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)

Variants (for ablation study)

File Description
intersect_conics_core.m Core method using eig() for pencil roots
intersect_conics_fast.m Optimized variant with single-root Newton

Quick Start

% 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);

Test Suite

% Run the parabola validation suite (7 configurations)
test_parabola_intersection

% Run the full experimental comparison (Section 6 of paper)
run_geometric_noise

Repository Structure

.
├── 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

Citation

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}
}

License

MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages