OtherIntersection

Element

Given a set of intersection points, this is another ('other') intersection point, If two elements of type curve, circle or line intersect in more than one point, with this element it is possible to construct one of the "other" intersections. This is a an intersection which is different from a supplied point or different from any point in an array of supplied points. This might be helpful in situtations where one intersection point is already part of the construction or in situtation where the order of the intersection points changes while interacting with the construction.

Usage (signatures)
board.create('otherintersection', [el1, el2, p]);

Parameters are two elements which are intersected and a point or an array of points which have to be different from the new intersection point.

Parameters
Name Type Description
el1 Circle | Curve | Line | Polygon | PolygonalChain
el2 Circle | Curve | Line | Polygon | PolygonalChain
p Point | Array
Examples

Create two intersection points of circle and line that are always differing

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

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

var p1 = board.create('intersection', [c1, l1, 0], {name:'D'});
var p2 = board.create('otherintersection', [c1, l1, p1], {name:'E'});

Intersection circle - circle

 var c1 = board.create('circle', [[0, 0], 3]);
 var c2 = board.create('circle', [[2, 2], 3]);

 var p1 = board.create('intersection', [c1, c2, 0]);
 var p2 = board.create('otherintersection', [c1, c2, p1]);

Intersection curve - line

 var curve = board.create('implicitcurve', ['-(y**2) + x**3 - 2 * x + 1'], { strokeWidth: 2 });
 var A = board.create('glider', [-1.5, 1, curve]);
 var B = board.create('glider', [0.5, 0.5, curve]);
 var line = board.create('line', [A, B], { color: 'black', strokeWidth: 1 });
 var C = board.create('otherintersection', [curve, line, [A, B]], {precision: 0.01});
 var D = board.create('point', [() => C.X(), () => -C.Y()], { name: '-C = A + B' });

Intersection curve - curve

 var c1 = board.create('functiongraph', ['x**2 - 3'], { strokeWidth: 2 });
 var A = board.create('point', [0, 2]);
 var c2 = board.create('functiongraph', [(x) => -(x**2) + 2 * A.X() * x + A.Y() - A.X()**2], { strokeWidth: 2 });
 var p1 = board.create('intersection', [c1, c2]);
 var p2 = board.create('otherintersection', [c1, c2, [p1]]);

Attributes

Own

none

Inherited

Members

Own

none

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 738

Extends