# Intersection curve

In geometry, an intersection curve is, in the most simple case, the intersection line of two non-parallel planes in Euclidean 3-space. In general, an intersection curve consists of the common points of two transversally intersecting surfaces, meaning that at any common point the surface normals are not parallel. This restriction excludes cases where the surfaces are touching or have surface parts in common.

The analytic determination of the intersection curve of two surfaces is easy only in simple cases; for example: a) the intersection of two planes, b) plane section of a quadric (sphere, cylinder, cone, etc.), c) intersection of two quadrics in special cases. For the general case, literature provides algorithms, in order to calculate points of the intersection curve of two surfaces.[1]

## Intersection line of two planes

Given: two planes ${\displaystyle \varepsilon _{i}:\quad {\vec {n}}_{i}\cdot {\vec {x}}=d_{i},\quad i=1,2,\quad {\vec {n}}_{1},{\vec {n}}_{2}}$ linearly independent, i.e. the planes are not parallel.

Wanted: A parametric representation ${\displaystyle {\vec {x}}={\vec {p}}+t{\vec {r}}}$ of the intersection line.

The direction of the line one gets from the crossproduct of the normal vectors: ${\displaystyle {\vec {r}}={\vec {n}}_{1}\times {\vec {n}}_{2}}$ .

A point ${\displaystyle P:{\vec {p}}}$ of the intersection line can be determined by intersecting the given planes ${\displaystyle \varepsilon _{1},\varepsilon _{2}}$ with the plane ${\displaystyle \varepsilon _{3}:{\vec {x}}=s_{1}{\vec {n}}_{1}+s_{2}{\vec {n}}_{2}}$ , which is perpendicular to ${\displaystyle \varepsilon _{1}}$ and ${\displaystyle \varepsilon _{2}}$ . Inserting the parametric representation of ${\displaystyle \varepsilon _{3}}$ into the equations of ${\displaystyle \varepsilon _{1}}$ und ${\displaystyle \varepsilon _{2}}$ yields the parameters ${\displaystyle s_{1}}$ and ${\displaystyle s_{2}}$ .

${\displaystyle P:{\vec {p}}={\frac {d_{1}({\vec {n}}_{2}\cdot {\vec {n}}_{2})-d_{2}({\vec {n}}_{1}\cdot {\vec {n}}_{2})}{({\vec {n}}_{1}\cdot {\vec {n}}_{1})({\vec {n}}_{2}\cdot {\vec {n}}_{2})-({\vec {n}}_{1}\cdot {\vec {n}}_{2})^{2}}}{\vec {n}}_{1}+{\frac {d_{2}({\vec {n}}_{1}\cdot {\vec {n}}_{1})-d_{1}({\vec {n}}_{1}\cdot {\vec {n}}_{2})}{({\vec {n}}_{1}\cdot {\vec {n}}_{1})({\vec {n}}_{2}\cdot {\vec {n}}_{2})-({\vec {n}}_{1}\cdot {\vec {n}}_{2})^{2}}}{\vec {n}}_{2}\ .}$

Example: ${\displaystyle \varepsilon _{1}:\ x+2y+z=1,\quad \varepsilon _{2}:\ 2x-3y+2z=2\ .}$

The normal vectors are ${\displaystyle {\vec {n}}_{1}=(1,2,1)^{\top },\ {\vec {n}}_{2}=(2,-3,2)^{\top }}$ and the direction of the intersection line is ${\displaystyle {\vec {r}}={\vec {n}}_{1}\times {\vec {n}}_{2}=(7,0,-7)^{\top }}$ . For point ${\displaystyle P:{\vec {p}}}$ , one gets from the formula above ${\displaystyle {\vec {p}}={\tfrac {1}{2}}(1,0,1)^{\top }\ .}$ Hence

${\displaystyle {\vec {x}}={\tfrac {1}{2}}(1,0,1)^{\top }+t(7,0,-7)^{\top }}$

is a parametric representation of the line of intersection.

Remarks:

1. In special cases, the determination of the intersection line by the Gaussian elimination may be faster.
2. If one (or both) of the planes is given parametrically by ${\displaystyle {\vec {x}}={\vec {p}}+s{\vec {v}}+t{\vec {w}}}$ , one gets ${\displaystyle {\vec {n}}={\vec {v}}\times {\vec {w}}}$ as normal vector and the equation is: ${\displaystyle {\vec {n}}\cdot {\vec {x}}={\vec {n}}\cdot {\vec {p}}}$ .

## Intersection curve of a plane and a quadric

In any case, the intersection curve of a plane and a quadric (sphere, cylinder, cone,...) is a conic section. For details, see.[2] An important application of plane sections of quadrics is contour lines of quadrics. In any case (parallel or central projection), the contour lines of quadrics are conic sections. See below and Umrisskonstruktion.

## Intersection curve of a cylinder or cone and a quadric

It is an easy task to determine the intersection points of a line with a quadric (i.e. line-sphere); one only has to solve a quadratic equation. So, any intersection curve of a cone or a cylinder (they are generated by lines) with a quadric consists of intersection points of lines and the quadric (see pictures).

The pictures show the possibilities which occur when intersecting a cylinder and a sphere:

1. In the first case, there exists just one intersection curve.
2. The second case shows an example where the intersection curve consists of two parts.
3. In the third case, the sphere and cylinder touch each other at one singular point. The intersection curve is self-intersecting.
4. If the cylinder and sphere have the same radius and the midpoint of the sphere is located on the axis of the cylinder, then the intersection curve consists of singular points (a circle) only.

## General case: marching method

In general, there are no special features to exploit. One possibility to determine a polygon of points of the intersection curve of two surfaces is the marching method (see section References). It consists of two essential parts:

1. The first part is the curve point algorithm, which determines to a starting point in the vicinity of the two surfaces a point on the intersection curve. The algorithm depends essentially on the representation of the given surfaces. The simplest situation is where both surfaces are implicitly given by equations ${\displaystyle f_{1}(x,y,z)=0,\ f_{2}(x,y,z)=0}$ , because the functions provide information about the distances to the surfaces and show via the gradients the way to the surfaces. If one or both the surfaces are parametrically given, the advantages of the implicit case do not exist. In this case, the curve point algorithm uses time-consuming procedures like the determination of the footpoint of a perpendicular on a surface.
2. The second part of the marching method starts with a first point on the intersection curve, determines the direction of the intersection curve using the surface normals, then makes a step with a given step length into the direction of the tangent line, in order to get a starting point for a second curve point, ... (see picture).

For details of the marching algorithm, see.[3]

The marching method produces for any starting point a polygon on the intersection curve. If the intersection curve consists of two parts, the algorithm has to be performed using a second convenient starting point. The algorithm is rather robust. Usually, singular points are no problem, because the chance to meet exactly a singular point is very small (see picture: intersection of a cylinder and the surface ${\displaystyle x^{4}+y^{4}+z^{4}=1}$ ).

## Application: contour line

A point ${\displaystyle (x,y,z)}$ of the contour line of an implicit surface with equation ${\displaystyle f(x,y,z)=0}$ and parallel projection with direction ${\displaystyle {\vec {v}}}$ has to fulfill the condition ${\displaystyle g(x,y,z)=\nabla f(x,y,z)\cdot {\vec {v}}=0}$ , because ${\displaystyle {\vec {v}}}$ has to be a tangent vector, which means any contour point is a point of the intersection curve of the two implicit surfaces

${\displaystyle f(x,y,z)=0,\ g(x,y,z)=0}$ .

For quadrics, ${\displaystyle g}$ is always a linear function. Hence the contour line of a quadric is always a plane section (i.e. a conic section).

The contour line of the surface ${\displaystyle f(x,y,z)=x^{4}+y^{4}+z^{4}-1=0}$ (see picture) was traced by the marching method.

Remark: The determination of a contour polygon of a parametric surface ${\displaystyle {\vec {x}}={\vec {x}}(s,t)}$ needs tracing an implicit curve in parameter plane.[4]

Condition for contour points: ${\displaystyle g(s,t)=({\vec {x}}_{s}(s,t)\times {\vec {x}}_{t}(s,t))\cdot {\vec {v}}=0}$ .

## Intersection curve of two polyhedrons

The intersection curve of two polyhedrons is a polygon (see intersection of three houses). The display of a parametrically defined surface is usually done by mapping a rectangular net into 3-space. The spatial quadrangles are nearly flat. So, for the intersection of two parametrically defined surfaces, the algorithm for the intersection of two polyhedrons can be used.[5] See picture of intersecting tori.