Usage (signatures)
board.create('arrow', [point1, point2]);
Create an arrow from two points, coordinate arrays or functions. In the latter two cases the point will be constructed automatically as a fixed invisible point. It is possible to provide a function returning an array or a point, instead of providing an array or a point.
Parameters
| Name | Type | Description |
|---|---|---|
point1 |
PointLike | First point |
point2 |
PointLike | Second point |
Example
// Create an arrow providing two points.
var p1 = board.create('point', [4.5, 2.0]);
var p2 = board.create('point', [1.0, 1.0]);
var l1 = board.create('arrow', [p1, p2]);
board.create('arrow', [a, b, c]);
Create an arrow from homogeneous coordinates. An arrow can also be created providing three numbers. The arrow is then described by the set of solutions of the equation $a\cdot z+b \cdot x+c\cdot y = 0$, i.e. a point $(z,x, y)$ is on the line $(a,b,c)$ if and only if $a\cdot z+b \cdot x+c\cdot y = 0$. In JSXGraph, for all finite points, z is normalized to the value 1.
It is possible to provide three functions returning numbers, too.
Parameters
| Name | Type | Description |
|---|---|---|
a |
number | function | |
b |
number | function | |
c |
number | function |
board.create('arrow', [f]);
Arrow by one function
Parameters
| Name | Type | Description |
|---|---|---|
f |
function | This function must return an array containing three numbers forming the arrow's homogeneous coordinates. |
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.Line
- See
- Source
- base/line.js, line 1682