Code covered by the BSD License  

Highlights from
Conics intersection

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 4.88 KB File ID: #28318

Conics intersection

by Pierluigi Taddei

 

28 Jul 2010 (Updated 03 Nov 2010)

Given the homogeneous matrices of two conics it recovers the (up to) four intersection points

| Watch this File

File Information
Description

For more info:
http://www.pigei.com/conics-intersection

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');
___________________

-- Changes history

v.1.0.2: bug fixes (characteristic polynom)

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
03 Nov 2010

changed URL

Tag Activity for this File
Tag Applied By Date/Time
conics Pierluigi Taddei 28 Jul 2010 10:04:38
conics intersections Pierluigi Taddei 28 Jul 2010 10:04:38
degenerate conic Pierluigi Taddei 28 Jul 2010 10:04:38
homogeneous coordinates Pierluigi Taddei 28 Jul 2010 10:04:38
self_rating Matt Fig 28 Jul 2010 11:24:38
homogeneous coordinates Eric 30 Sep 2010 21:39:34

Contact us at files@mathworks.com