Misplaced Pages

Implicit curve

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Plane curve defined by an implicit equation
Cassini ovals:
(1) a=1.1, c=1 (above),
(2) a=c=1 (middle),
(3) a=1, c=1.05 (below)
Implicit curve: sin ( x + y ) cos ( x y ) + 1 = 0 {\displaystyle \sin(x+y)-\cos(xy)+1=0}
Implicit curve sin ( x + y ) cos ( x y ) + 1 = 0 {\displaystyle \sin(x+y)-\cos(xy)+1=0} as level curves of the surface z = sin ( x + y ) cos ( x y ) + 1 {\displaystyle z=\sin(x+y)-\cos(xy)+1}

In mathematics, an implicit curve is a plane curve defined by an implicit equation relating two coordinate variables, commonly x and y. For example, the unit circle is defined by the implicit equation x 2 + y 2 = 1 {\displaystyle x^{2}+y^{2}=1} . In general, every implicit curve is defined by an equation of the form

F ( x , y ) = 0 {\displaystyle F(x,y)=0}

for some function F of two variables. Hence an implicit curve can be considered as the set of zeros of a function of two variables. Implicit means that the equation is not expressed as a solution for either x in terms of y or vice versa.

If F ( x , y ) {\displaystyle F(x,y)} is a polynomial in two variables, the corresponding curve is called an algebraic curve, and specific methods are available for studying it.

Plane curves can be represented in Cartesian coordinates (x, y coordinates) by any of three methods, one of which is the implicit equation given above. The graph of a function is usually described by an equation y = f ( x ) {\displaystyle y=f(x)} in which the functional form is explicitly stated; this is called an explicit representation. The third essential description of a curve is the parametric one, where the x- and y-coordinates of curve points are represented by two functions x(t), y(t) both of whose functional forms are explicitly stated, and which are dependent on a common parameter t . {\displaystyle t.}

Examples of implicit curves include:

  1. a line: x + 2 y 3 = 0 , {\displaystyle x+2y-3=0,}
  2. a circle: x 2 + y 2 4 = 0 , {\displaystyle x^{2}+y^{2}-4=0,}
  3. the semicubical parabola: x 3 y 2 = 0 , {\displaystyle x^{3}-y^{2}=0,}
  4. Cassini ovals ( x 2 + y 2 ) 2 2 c 2 ( x 2 y 2 ) ( a 4 c 4 ) = 0 {\displaystyle (x^{2}+y^{2})^{2}-2c^{2}(x^{2}-y^{2})-(a^{4}-c^{4})=0} (see diagram),
  5. sin ( x + y ) cos ( x y ) + 1 = 0 {\displaystyle \sin(x+y)-\cos(xy)+1=0} (see diagram).

The first four examples are algebraic curves, but the last one is not algebraic. The first three examples possess simple parametric representations, which is not true for the fourth and fifth examples. The fifth example shows the possibly complicated geometric structure of an implicit curve.

The implicit function theorem describes conditions under which an equation F ( x , y ) = 0 {\displaystyle F(x,y)=0} can be solved implicitly for x and/or y – that is, under which one can validly write x = g ( y ) {\displaystyle x=g(y)} or y = f ( x ) {\displaystyle y=f(x)} . This theorem is the key for the computation of essential geometric features of the curve: tangents, normals, and curvature. In practice implicit curves have an essential drawback: their visualization is difficult. But there are computer programs enabling one to display an implicit curve. Special properties of implicit curves make them essential tools in geometry and computer graphics.

An implicit curve with an equation F ( x , y ) = 0 {\displaystyle F(x,y)=0} can be considered as the level curve of level 0 of the surface z = F ( x , y ) {\displaystyle z=F(x,y)} (see third diagram).

Slope and curvature

In general, implicit curves fail the vertical line test (meaning that some values of x are associated with more than one value of y) and so are not necessarily graphs of functions. However, the implicit function theorem gives conditions under which an implicit curve locally is given by the graph of a function (so in particular it has no self-intersections). If the defining relations are sufficiently smooth then, in such regions, implicit curves have well defined slopes, tangent lines, normal vectors, and curvature.

There are several possible ways to compute these quantities for a given implicit curve. One method is to use implicit differentiation to compute the derivatives of y with respect to x. Alternatively, for a curve defined by the implicit equation F ( x , y ) = 0 {\displaystyle F(x,y)=0} , one can express these formulas directly in terms of the partial derivatives of F {\displaystyle F} . In what follows, the partial derivatives are denoted F x {\displaystyle F_{x}} (for the derivative with respect to x), F y {\displaystyle F_{y}} , F x x {\displaystyle F_{xx}} (for the second partial with respect to x), F x y {\displaystyle F_{xy}} (for the mixed second partial), F y y . {\displaystyle F_{yy}.}

Tangent and normal vector

A curve point ( x 0 , y 0 ) {\displaystyle (x_{0},y_{0})} is regular if the first partial derivatives F x ( x 0 , y 0 ) {\displaystyle F_{x}(x_{0},y_{0})} and F y ( x 0 , y 0 ) {\displaystyle F_{y}(x_{0},y_{0})} are not both equal to 0.

The equation of the tangent line at a regular point ( x 0 , y 0 ) {\displaystyle (x_{0},y_{0})} is

F x ( x 0 , y 0 ) ( x x 0 ) + F y ( x 0 , y 0 ) ( y y 0 ) = 0 , {\displaystyle F_{x}(x_{0},y_{0})(x-x_{0})+F_{y}(x_{0},y_{0})(y-y_{0})=0,}

so the slope of the tangent line, and hence the slope of the curve at that point, is

slope = F x ( x 0 , y 0 ) F y ( x 0 , y 0 ) . {\displaystyle {\text{slope}}=-{\frac {F_{x}(x_{0},y_{0})}{F_{y}(x_{0},y_{0})}}.}

If F y ( x , y ) = 0 F x ( x , y ) {\displaystyle F_{y}(x,y)=0\neq F_{x}(x,y)} at ( x 0 , y 0 ) , {\displaystyle (x_{0},y_{0}),} the curve is vertical at that point, while if both F y ( x , y ) = 0 {\displaystyle F_{y}(x,y)=0} and F x ( x , y ) = 0 {\displaystyle F_{x}(x,y)=0} at that point then the curve is not differentiable there, but instead is a singular point – either a cusp or a point where the curve intersects itself.

A normal vector to the curve at the point is given by

n ( x 0 , y 0 ) = ( F x ( x 0 , y 0 ) , F y ( x 0 , y 0 ) ) {\displaystyle \mathbf {n} (x_{0},y_{0})=(F_{x}(x_{0},y_{0}),F_{y}(x_{0},y_{0}))}

(here written as a row vector).

Curvature

For readability of the formulas, the arguments ( x 0 , y 0 ) {\displaystyle (x_{0},y_{0})} are omitted. The curvature κ {\displaystyle \kappa } at a regular point is given by the formula

κ = F y 2 F x x + 2 F x F y F x y F x 2 F y y ( F x 2 + F y 2 ) 3 / 2 {\displaystyle \kappa ={\frac {-F_{y}^{2}F_{xx}+2F_{x}F_{y}F_{xy}-F_{x}^{2}F_{yy}}{(F_{x}^{2}+F_{y}^{2})^{3/2}}}} .

Derivation of the formulas

The implicit function theorem guarantees within a neighborhood of a point ( x 0 , y 0 ) {\displaystyle (x_{0},y_{0})} the existence of a function f {\displaystyle f} such that F ( x , f ( x ) ) = 0 {\displaystyle F(x,f(x))=0} . By the chain rule, the derivatives of function f {\displaystyle f} are

f ( x ) = F x ( x , f ( x ) ) F y ( x , f ( x ) ) {\displaystyle f'(x)=-{\frac {F_{x}(x,f(x))}{F_{y}(x,f(x))}}} and f ( x ) = F y 2 F x x + 2 F x F y F x y F x 2 F y y F y 3 {\displaystyle f''(x)={\frac {-F_{y}^{2}F_{xx}+2F_{x}F_{y}F_{xy}-F_{x}^{2}F_{yy}}{F_{y}^{3}}}}

(where the arguments ( x , f ( x ) ) {\displaystyle (x,f(x))} on the right side of the second formula are omitted for ease of reading).

Inserting the derivatives of function f {\displaystyle f} into the formulas for a tangent and curvature of the graph of the explicit equation y = f ( x ) {\displaystyle y=f(x)} yields

y = f ( x 0 ) + f ( x 0 ) ( x x 0 ) {\displaystyle y=f(x_{0})+f'(x_{0})(x-x_{0})} (tangent)
κ ( x 0 ) = f ( x 0 ) ( 1 + f ( x 0 ) 2 ) 3 / 2 {\displaystyle \kappa (x_{0})={\frac {f''(x_{0})}{(1+f'(x_{0})^{2})^{3/2}}}} (curvature).

Advantage and disadvantage of implicit curves

Disadvantage

The essential disadvantage of an implicit curve is the lack of an easy possibility to calculate single points which is necessary for visualization of an implicit curve (see next section).

Advantages

  1. Implicit representations facilitate the computation of intersection points: If one curve is represented implicitly and the other parametrically the computation of intersection points needs only a simple (1-dimensional) Newton iteration, which is contrary to the cases implicit-implicit and parametric-parametric (see Intersection).
  2. An implicit representation F ( x , y ) = 0 {\displaystyle F(x,y)=0} gives the possibility of separating points not on the curve by the sign of F ( x , y ) {\displaystyle F(x,y)} . This may be helpful for example applying the false position method instead of a Newton iteration.
  3. It is easy to generate curves which are almost geometrically similar to the given implicit curve F ( x , y ) = 0 , {\displaystyle F(x,y)=0,} by just adding a small number: F ( x , y ) c = 0 {\displaystyle F(x,y)-c=0} (see section #Smooth approximations).

Applications of implicit curves

Smooth approximation of a convex polygon
Smooth approximation of 1)one half of a circle, 2) an intersection of two circles

Within mathematics implicit curves play a prominent role as algebraic curves. In addition, implicit curves are used for designing curves of desired geometrical shapes. Here are two examples.

Smooth approximations

Convex polygons

A smooth approximation of a convex polygon can be achieved in the following way: Let g i ( x , y ) = a i x + b i y + c i = 0 ,   i = 1 , , n {\displaystyle g_{i}(x,y)=a_{i}x+b_{i}y+c_{i}=0,\ i=1,\dotsc ,n} be the equations of the lines containing the edges of the polygon such that for an inner point of the polygon g i {\displaystyle g_{i}} is positive. Then a subset of the implicit curve

F ( x , y ) = g 1 ( x , y ) g n ( x , y ) c = 0 {\displaystyle F(x,y)=g_{1}(x,y)\cdots g_{n}(x,y)-c=0}

with suitable small parameter c {\displaystyle c} is a smooth (differentiable) approximation of the polygon. For example, the curves

F ( x , y ) = ( x + 1 ) ( x + 1 ) y ( x y + 2 ) ( x y + 2 ) c = 0 {\displaystyle F(x,y)=(x+1)(-x+1)y(-x-y+2)(x-y+2)-c=0} for c = 0.03 , , 0.6 {\displaystyle c=0.03,\dotsc ,0.6}

contain smooth approximations of a polygon with 5 edges (see diagram).

Pairs of lines

In case of two lines

F ( x , y ) = g 1 ( x , y ) g 2 ( x , y ) c = 0 {\displaystyle F(x,y)=g_{1}(x,y)g_{2}(x,y)-c=0}

one gets

a pencil of parallel lines, if the given lines are parallel or
the pencil of hyperbolas, which have the given lines as asymptotes.

For example, the product of the coordinate axes variables yields the pencil of hyperbolas x y c = 0 ,   c 0 {\displaystyle xy-c=0,\ c\neq 0} , which have the coordinate axes as asymptotes.

Others

If one starts with simple implicit curves other than lines (circles, parabolas,...) one gets a wide range of interesting new curves. For example,

F ( x , y ) = y ( x 2 y 2 + 1 ) c = 0 {\displaystyle F(x,y)=y(-x^{2}-y^{2}+1)-c=0}

(product of a circle and the x-axis) yields smooth approximations of one half of a circle (see picture), and

F ( x , y ) = ( x 2 ( y + 1 ) 2 + 4 ) ( x 2 ( y 1 ) 2 + 4 ) c = 0 {\displaystyle F(x,y)=(-x^{2}-(y+1)^{2}+4)(-x^{2}-(y-1)^{2}+4)-c=0}

(product of two circles) yields smooth approximations of the intersection of two circles (see diagram).

Blending curves

Blending curve (red) of two circles

In CAD one uses implicit curves for the generation of blending curves, which are special curves establishing a smooth transition between two given curves. For example,

F ( x , y ) = ( 1 μ ) f 1 f 2 μ ( g 1 g 2 ) 3 = 0 {\displaystyle F(x,y)=(1-\mu )f_{1}f_{2}-\mu (g_{1}g_{2})^{3}=0}

generates blending curves between the two circles

f 1 ( x , y ) = ( x x 1 ) 2 + y 2 r 1 2 = 0 , {\displaystyle f_{1}(x,y)=(x-x_{1})^{2}+y^{2}-r_{1}^{2}=0,}
f 2 ( x , y ) = ( x x 2 ) 2 + y 2 r 2 2 = 0. {\displaystyle f_{2}(x,y)=(x-x_{2})^{2}+y^{2}-r_{2}^{2}=0.}

The method guarantees the continuity of the tangents and curvatures at the points of contact (see diagram). The two lines

g 1 ( x , y ) = x x 1 = 0 ,   g 2 ( x , y ) = x x 2 = 0 {\displaystyle g_{1}(x,y)=x-x_{1}=0,\ g_{2}(x,y)=x-x_{2}=0}

determine the points of contact at the circles. Parameter μ {\displaystyle \mu } is a design parameter. In the diagram, μ = 0.05 , , 0.2 {\displaystyle \mu =0.05,\dotsc ,0.2} .

Equipotential curves of two point charges

Equipotential curves of two point charges at the blue points

Equipotential curves of two equal point charges at the points P 1 = ( 1 , 0 ) , P 2 = ( 1 , 0 ) {\displaystyle P_{1}=(1,0),\;P_{2}=(-1,0)} can be represented by the equation

f ( x , y ) = 1 | P P 1 | + 1 | P P 2 | c {\displaystyle f(x,y)={\frac {1}{|PP_{1}|}}+{\frac {1}{|PP_{2}|}}-c}
= 1 ( x 1 ) 2 + y 2 + 1 ( x + 1 ) 2 + y 2 c = 0. {\displaystyle ={\frac {1}{\sqrt {(x-1)^{2}+y^{2}}}}+{\frac {1}{\sqrt {(x+1)^{2}+y^{2}}}}-c=0.}

The curves are similar to Cassini ovals, but they are not such curves.

Visualization of an implicit curve

To visualize an implicit curve one usually determines a polygon on the curve and displays the polygon. For a parametric curve this is an easy task: One just computes the points of a sequence of parametric values. For an implicit curve one has to solve two subproblems:

  1. determination of a first curve point to a given starting point in the vicinity of the curve,
  2. determination of a curve point starting from a known curve point.

In both cases it is reasonable to assume grad F ( 0 , 0 ) {\displaystyle \operatorname {grad} F\neq (0,0)} . In practice this assumption is violated at single isolated points only.

Point algorithm

For the solution of both tasks mentioned above it is essential to have a computer program (which we will call C P o i n t {\displaystyle {\mathsf {CPoint}}} ), which, when given a point Q 0 = ( x 0 , y 0 ) {\displaystyle Q_{0}=(x_{0},y_{0})} near an implicit curve, finds a point P {\displaystyle P} that is exactly on the curve, up to the accuracy of computation:

(P1) for the start point is j = 0 {\displaystyle j=0}
(P2) repeat
( x j + 1 , y j + 1 ) = ( x j , y j ) F ( x j , y j ) F x ( x j , y j ) 2 + F y ( x j , y j ) 2 ( F x ( x j , y j ) , F y ( x j , y j ) ) . {\displaystyle (x_{j+1},y_{j+1})=(x_{j},y_{j})-{\frac {F(x_{j},y_{j})}{F_{x}(x_{j},y_{j})^{2}+F_{y}(x_{j},y_{j})^{2}}}\,\left(F_{x}(x_{j},y_{j}),F_{y}(x_{j},y_{j})\right).}
(Newton step for function g ( t ) = F ( x j + t F x ( x j , y j ) , y j + t F y ( x j , y j ) )   . {\displaystyle g(t)=F\left(x_{j}+tF_{x}(x_{j},y_{j}),y_{j}+tF_{y}(x_{j},y_{j})\right)\ .} )
(P3) until the distance between the points ( x j + 1 , y j + 1 ) , ( x j , y j ) {\displaystyle (x_{j+1},y_{j+1}),\,(x_{j},y_{j})} is small enough.
(P4) P = ( x j + 1 , y j + 1 ) {\displaystyle P=(x_{j+1},y_{j+1})} is the curve point near the start point Q 0 {\displaystyle Q_{0}} .

Tracing algorithm

to the tracing algorithm: starting points are green

In order to generate a nearly equally spaced polygon on the implicit curve one chooses a step length s {\displaystyle s} and

(T1) chooses a suitable starting point in the vicinity of the curve
(T2) determines a first curve point P 1 {\displaystyle P_{1}} using program C P o i n t {\displaystyle {\mathsf {CPoint}}}
(T3) determines the tangent (see above), chooses a starting point on the tangent using step length s {\displaystyle s} (see diagram) and determines a second curve point P 2 {\displaystyle P_{2}} using program C P o i n t {\displaystyle {\mathsf {CPoint}}} .
{\displaystyle \cdots }

Because the algorithm traces the implicit curve it is called a tracing algorithm. The algorithm traces only connected parts of the curve. If the implicit curve consists of several parts it has to be started several times with suitable starting points.

Example: An illustration of the raster algorithm applied to the implicit curve F ( x , y ) = ( 3 x 2 y 2 ) 2 y 2 ( x 2 + y 2 ) 4 = 0 {\displaystyle F(x,y)=(3x^{2}-y^{2})^{2}y^{2}-(x^{2}+y^{2})^{4}=0} . The curve (red) is what the algorithm is trying to draw. The raster points (black) are used as starting points to find the closest points on the curve (red circles). The spacing between each raster point is exaggerated to show the individual curve points; to more accurately trace the curve, more raster points would be used.

Raster algorithm

If the implicit curve consists of several or even unknown parts, it may be better to use a rasterisation algorithm. Instead of exactly following the curve, a raster algorithm covers the entire curve in so many points that they blend together and look like the curve.

(R1) Generate a net of points (raster) on the area of interest of the x-y-plane.
(R2) For every point P {\displaystyle P} in the raster, run the point algorithm C P o i n t {\displaystyle {\mathsf {CPoint}}} starting from P, then mark its output.

If the net is dense enough, the result approximates the connected parts of the implicit curve. If for further applications polygons on the curves are needed one can trace parts of interest by the tracing algorithm.

Implicit space curves

Any space curve which is defined by two equations

F ( x , y , z ) = 0 , G ( x , y , z ) = 0 {\displaystyle {\begin{matrix}F(x,y,z)=0,\\G(x,y,z)=0\end{matrix}}}

is called an implicit space curve.

A curve point ( x 0 , y 0 , z 0 ) {\displaystyle (x_{0},y_{0},z_{0})} is called regular if the cross product of the gradients F {\displaystyle F} and G {\displaystyle G} is not ( 0 , 0 , 0 ) {\displaystyle (0,0,0)} at this point:

t ( x 0 , y 0 , z 0 ) = grad F ( x 0 , y 0 , z 0 ) × grad G ( x 0 , y 0 , z 0 ) ( 0 , 0 , 0 ) ; {\displaystyle \mathbf {t} (x_{0},y_{0},z_{0})=\operatorname {grad} F(x_{0},y_{0},z_{0})\times \operatorname {grad} G(x_{0},y_{0},z_{0})\neq (0,0,0);}

otherwise it is called singular. Vector t ( x 0 , y 0 , z 0 ) {\displaystyle \mathbf {t} (x_{0},y_{0},z_{0})} is a tangent vector of the curve at point ( x 0 , y 0 , z 0 ) . {\displaystyle (x_{0},y_{0},z_{0}).}

Intersection curve between a sphere and a cylinder

Examples:

( 1 ) x + y + z 1 = 0   ,   x y + z 2 = 0 {\displaystyle (1)\quad x+y+z-1=0\ ,\ x-y+z-2=0}

is a line.

( 2 ) x 2 + y 2 + z 2 4 = 0   ,   x + y + z 1 = 0 {\displaystyle (2)\quad x^{2}+y^{2}+z^{2}-4=0\ ,\ x+y+z-1=0}

is a plane section of a sphere, hence a circle.

( 3 ) x 2 + y 2 1 = 0   ,   x + y + z 1 = 0 {\displaystyle (3)\quad x^{2}+y^{2}-1=0\ ,\ x+y+z-1=0}

is an ellipse (plane section of a cylinder).

( 4 ) x 2 + y 2 + z 2 16 = 0   ,   ( y y 0 ) 2 + z 2 9 = 0 {\displaystyle (4)\quad x^{2}+y^{2}+z^{2}-16=0\ ,\ (y-y_{0})^{2}+z^{2}-9=0}

is the intersection curve between a sphere and a cylinder.

For the computation of curve points and the visualization of an implicit space curve see Intersection.

See also

References

  1. Goldman, R. (2005). "Curvature formulas for implicit curves and surfaces". Computer Aided Geometric Design. 22 (7): 632–658. CiteSeerX 10.1.1.413.3008. doi:10.1016/j.cagd.2005.06.005.
  2. C. Hoffmann & J. Hopcroft: The potential method for blending surfaces and corners in G. Farin (Ed) Geometric-Modeling, SIAM, Philadelphia, pp. 347-365
  3. E. Hartmann: Blending of implicit surfaces with functional splines, CAD,Butterworth-Heinemann, Volume 22 (8), 1990, p. 500-507
  4. G. Taubin: Distance Approximations for Rastering Implicit Curves. ACM Transactions on Graphics, Vol. 13, No. 1, 1994.
  • Gomes, A., Voiculescu, I., Jorge, J., Wyvill, B., Galbraith, C.: Implicit Curves and Surfaces: Mathematics, Data Structures and Algorithms, 2009, Springer-Verlag London, ISBN 978-1-84882-405-8
  • C:L: Bajaj, C.M. Hoffmann, R.E. Lynch: Tracing surface intersections, Comp. Aided Geom. Design 5 (1988), 285-307.
  • Geometry and Algorithms for COMPUTER AIDED DESIGN

External links

Categories: