intersectConicConic: Intersection between two conics

View source: R/intersectConicConic.R

intersectConicConicR Documentation

Intersection between two conics

Description

Returns the point(s) of intersection between two conics in homogeneous coordinates.

Usage

intersectConicConic(C1, C2)

Arguments

C1

(3 \times 3) matrix representation of conics.

C2

(3 \times 3) matrix representation of conics.

Value

The homogeneous coordinates of the intersection points. If there are k points of intersection, it returns a (3 \times k) matrix whose columns correspond to the homogeneous coordinates of the intersection points. If there is only one point, a (3 \times 1) vector of the homogeneous coordinates of the intersection point is returned. If there is no intersection, NULL is returned.

Source

Richter-Gebert, Jürgen (2011). Perspectives on Projective Geometry - A Guided Tour Through Real and Complex Geometry, Springer, Berlin, ISBN: 978-3-642-17285-4

Examples

# Ellipse with semi-axes a=8, b=2, centered in (0,0), with orientation angle = -pi/3
C1 <- ellipseToConicMatrix(c(8,2), c(0,0), -pi/3)

# Ellipse with semi-axes a=5, b=2, centered in (1,-2), with orientation angle = pi/5
C2 <- ellipseToConicMatrix(c(5,2), c(1,-2), pi/5)

# intersection conic C with conic C2
p_CC2 <- intersectConicConic(C1,C2)

# plot
plot(ellipse(c(8,2), c(0,0), -pi/3),type="l",asp=1)
lines(ellipse(c(5,2), c(1,-2), pi/5), col="blue")
points(t(p_CC2), pch=20,col="blue")

RConics documentation built on March 18, 2022, 5:33 p.m.