Conics intersection

Given the homogeneous matrices of two conics it recovers the (up to) four intersection points
1,5K téléchargements
Mise à jour 30 août 2015

Afficher la licence

The homogeneous representation of a conic is a matrix
m = [A C D; C B E; D E F] that represents the equation
A x^2 + B y^2 + 2C xy + 2D x + 2Ey + F = 0
Given two matrix E1 and E2 representing two conics, the code will detect all their intersections.

For instance:
___________________
%a circle centered in the origin
E1 = [1 0 0; 0 1 0; 0 0 -3]

%an ellipse centered in the origin
E2 = [1 0 0; 0 3 0; 0 0 -6]

%get the four homogeneous intersections
P = intersectConics(E1, E2)

%plot the normalized points
plot(P(1,:) ./ P(3,:) , P(2,:) ./ P(3,:), 'ro');

___________________
For more info: http://www.pigei.com/conics-intersection
and a detailed example describing the method: http://math.stackexchange.com/questions/316849/intersection-of-conics-using-matrix-representation

A C++ open souce implementation is also present at https://bitbucket.org/pierluigi/conicsintersection

___________________
If this code was useful, please consider a donation:
Bitcoin: 3BUD7cEnbpp15hZXbPZpdgnH11FAV1kvfi

Citation pour cette source

Pierluigi Taddei (2026). Conics intersection (https://fr.mathworks.com/matlabcentral/fileexchange/28318-conics-intersection), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2008a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Verification, Validation, and Test dans Help Center et MATLAB Answers
Version Publié le Notes de version
1.5.0.0

summary update
added C++ link

1.4.0.0

added case for linear equations

1.3.0.0

v.1.0.3: bug fixes (degenerate case)

1.1.0.0

changed URL

1.0.0.0