Voltage droop

From formulasearchengine
Revision as of 16:13, 17 August 2011 by 194.138.39.56 (talk) (References)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The intersection of lines.

In Euclidean geometry, the intersection of a line and a line can be the empty set, a point, or a line. Distinguishing these cases and finding the intersection point have use, for example, in computer graphics, motion planning, and collision detection.

The number and locations of possible intersections between two lines and the number of possible lines with no intersections (parallel) with a given line are the distinguishing features of non-Euclidean geometry.

Mathematics

First we consider the intersection of two lines L1 and L2 in 2-dimensional space, with line L1 being defined by two distinct points (x1,y1) and (x2,y2), and line L2 being defined by two distinct points (x3,y3) and (x4,y4).[1]

The intersection P of line L1 and L2 can be defined using determinants.

Px=||x1y1x2y2||x11x21||x3y3x4y4||x31x41||||x11x21||y11y21||x31x41||y31y41||Py=||x1y1x2y2||y11y21||x3y3x4y4||y31y41||||x11x21||y11y21||x31x41||y31y41||

The determinants can be written out as:

(Px,Py)=((x1y2y1x2)(x3x4)(x1x2)(x3y4y3x4)(x1x2)(y3y4)(y1y2)(x3x4),(x1y2y1x2)(y3y4)(y1y2)(x3y4y3x4)(x1x2)(y3y4)(y1y2)(x3x4))

Note that the intersection point is for the infinitely long lines defined by the points, rather than the line segments between the points, and can produce an intersection point beyond the lengths of the line segments. If (rather than solving for the point in a single step), the solution in terms of first degree Bézier parameters is first found, then this intermediate result can be checked for 0.0 ≤ t ≤ 1.0 and 0.0 ≤ u ≤ 1.0 (where t and u are the driving variables).

When the two lines are parallel or coincident the denominator term is zero:

(x1x2)(y3y4)(y1y2)(x3x4)=0 if the lines are parallel

If the lines are very close to being parallel, then a computer solution may encounter numeric problems in the solution described above, and so recognition of this condition may require an appropriately "fuzzy" test in practical application. A more robust and general solution may be obtained by rotation of the line segments to drive one of them horizontal, whence the solution of the rotated parametric form of the second line is easily obtained. Careful discussion of the special cases is required (parallel lines/coincident lines, overlapping/non-overlapping intervals).

n-line intersection

In two dimensions, more than two lines almost certainly do not intersect at a single point. Similarly, in three or more dimensions, even two lines almost certainly do not intersect; pairs of lines that do not intersect are called skew lines. However, in two or more dimensions, we can usually find a point that is mutually closest to two or more lines in a least-squares sense.

In the two-dimensional case, first, represent line i as a point, pi, on the line and a unit normal vector, n̂i, perpendicular to that line. That is, if x1 and x2 are points on line 1, then let p1=x1 and let

n̂1:=[0110](x2x1)/x2x1

which is the unit vector along the line, rotated by 90 degrees.

Note that the distance from a point, x to the line (p,n̂) is given by

d(x,(p,n))=(xp)n̂=(xp)n̂=(xp)n̂n̂(xp).

And so the squared distance from a point, x, to a line is

d(x,(p,n))2=(xp)(n̂n̂)(xp).

the sum of squared distances to many lines is the cost function:

E(x)=i(xpi)(n̂in̂i)(xpi).

This can be rearranged:

E(x)=ixn̂in̂ixxn̂in̂ipipin̂in̂ix+pin̂in̂ip=x(in̂in̂i)x2x(in̂in̂ipi)+ipin̂in̂ipi.

To find the minimum, we differentiate with respect to x and set the result equal to the zero vector:

E(x)x=0=2(in̂in̂i)x2(in̂in̂ipi)

so

(in̂in̂i)x=in̂in̂ipi

and so

x=(in̂in̂i)1(in̂in̂ipi).

While n̂i is not well-defined in more than two dimensions, this can be generalized to any number of dimensions by noting that n̂in̂i is simply the (symmetric) matrix with all eigenvalues unity except for a zero eigenvalue in the direction along the line providing a seminorm on the distance between pi and another point giving the distance to the line. In any number of dimensions, if v̂i is a unit vector along the ith line, then

n̂in̂i becomes Iv̂iv̂i

where I is the identity matrix, and so

x=(iIv̂iv̂i)1(i(Iv̂iv̂i)pi).

Potter or Ceramic Artist Truman Bedell from Rexton, has interests which include ceramics, best property developers in singapore developers in singapore and scrabble. Was especially enthused after visiting Alejandro de Humboldt National Park.

X and Y values of intersection on a linear curve

The X and Y values of the point of intersection of 2 lines can easily be found using the following substitutions and rearrangements.

Suppose 2 lines with the equations y=ax+c and y=bx+d where a and b are the gradients of the lines and where c and d are the y-intercepts of the lines. At the point at which the 2 lines intersect, both y values will be the same, hence the following equality.

ax+c=bx+d

We can rearrange the latter to extract the value of x.

axbx=dc
x=dcab

To find the Y value, all we need to do is substitute the value of x into one of the 2 line equations:

y=adcab+c

Hence, the point of intersection is

P(dcab;adcab+c)

Using homogeneous coordinates

By using homogeneous coordinates, the intersection point of two implicitly defined lines can be determined quite easily. In 2D, every point can be defined as a projection of a 3D point, given as the ordered triple (X,Y,W). The mapping from 3D to 2D coordinates is (x,y) = (X/W, Y/W). 2D points can be converted to homogeneous coordinates by defining them as (x,y,1). Thus, the implicit equation of a line can be given in homogeneous coordinates as:

aX+bY+cW=0L(a,b,c)P(X,Y,W)=0

We can do a similar operation with the cross product to get the intersection of 2 lines:

L(a1,b1,c1)×L(a2,b2,c2)=P(X,Y,W)

This returns the intersection point in homogeneous coordinates. In the special case of W = 0, we say that the intersection point is at infinity. This means the lines are parallel. As an aside, the implicit coefficients of a line can be obtained by the cross product of two points:

P(x1,y1,w1)×P(x2,y2,w2)=L(a,b,c)

See also

References