Ellipse

Element

An ellipse is a special conic section given by two points (the foci) and a third point on the ellipse or the length of the major axis.

Usage (signatures)
board.create('ellipse', [point1, point2, point3, startopt, endopt]);

Parent elements can be three elements either of type JXG.Point or array of numbers describing the coordinates of a point. In the latter case the point will be constructed automatically as a fixed invisible point.

Parameters
Name Type Attributes Default Description
point1 PointLike
point2 PointLike
point3 PointLike
start Number <optional>
0

parameter of the curve start, default: 0.

end Number <optional>
2π

parameter for the curve end, default: 2π.

Examples

Create an ellipse by three points

var A = board.create('point', [-1,4]);
var B = board.create('point', [-1,-4]);
var C = board.create('point', [1,1]);
var el = board.create('ellipse',[A,B,C]);

Create an elliptical arc

var p1 = board.create('point', [-1, 2]);
var p2 = board.create('point', [ 1, 2]);
var p3 = board.create('point', [0, 3]);

var ell = board.create('ellipse', [
  p1, p2, p3, 0, Math.PI], {
  lastArrow: {type: 7}
});

board.create('ellipse', [point1, point2, number, startopt, endopt]);

Parent elements can be two elements either of type JXG.Point or array of numbers describing the coordinates of a point. The third parameter is a number/function which defines the length of the major axis

Parameters
Name Type Attributes Default Description
point1 PointLike
point2 PointLike
number NumberLike
start Number <optional>
0

parameter of the curve start, default: 0.

end Number <optional>
2π

parameter for the curve end, default: 2π.

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.Curve
See
Source
element/conic.js, line 47

Extends