Intersection

Element

A point intersecting two 1-dimensional elements.

It is one point of the set consisting of the intersection points of the two elements. The following element types can be (mutually) intersected: line, circle, curve, polygon, polygonal chain.

Usage (signatures)
board.create('intersection', [el1, el2, iopt]);

Intersect two elements el1 and el2. The optional parameter i determines the intersection point if two points are available:

  • i==0: use the positive square root,
  • i==1: use the negative square root.
Parameters
Name Type Attributes Default Description
el1 Circle | Curve | Line | Polygon | PolygonalChain
el2 Circle | Curve | Line | Polygon | PolygonalChain
i NumberLike <optional>
0
Example

Create an intersection point of circle and line

var p1 = board.create('point', [4.0, 4.0]);
var c1 = board.create('circle', [p1, 2.0]);

var p2 = board.create('point', [1.0, 1.0]);
var p3 = board.create('point', [5.0, 3.0]);
var l1 = board.create('line', [p2, p3]);

var i = board.create('intersection', [c1, l1, 0]);
Attributes

Own

alwaysIntersect

Description

Used in JXG.Intersection. This flag sets the behaviour of intersection points of a segment with another object. If true, the segment is treated as an (infinte) line. If false the intersection point exists if the segment intersects the other object setwise.

Here, JSXGraph distinguishes whether the object is a segment or a line wlement that is displayed as a segment (with staightFirst = straightLast = true). In the latter case, the object is always treated like an infinite line, regardless if it appears like a segment or an infinite line.

Type
Boolean
Default Value
true
Source
options.js, line 6649

Inherited

Members

Own

(private, static) intersectionNumbers : Array

Description

Array of length 2 containing the numbers i and j. The intersection point is i-th intersection point. j is unused.

Type
Array
Source
base/point.js, line 710

Inherited

Methods

Own

none

Inherited

Events

Own

none

Inherited

Throws

If the element cannot be constructed with the given parent objects an exception is thrown.

Type
Exception

Details

Type
JXG.Point
Source
base/point.js, line 624

Extends