Usage (signatures)
board.create('slopetriangle', [t]);
Parameters
| Name | Type | Description |
|---|---|---|
t |
Line | A tangent based on a glider on some object, e.g. curve, circle, line or turtle. |
Example
// Create a slopetriangle on a tangent
var f = board.create('plot', ['sin(x)']),
g = board.create('glider', [1, 2, f]),
t = board.create('tangent', [g]),
st = board.create('slopetriangle', [t]);
board.create('slopetriangle', [line, p]);
A line and a point on that line. The user has to take care that the point is a member of the line.
Parameters
| Name | Type | Description |
|---|---|---|
line |
Line | |
p |
Point |
Example
// Create a on a line and a point on that line
var p1 = board.create('point', [-2, 3]),
p2 = board.create('point', [2, -3]),
li = board.create('line', [p1, p2]),
p = board.create('glider', [0, 0, li]),
st = board.create('slopetriangle', [li, p]);
Attributes
Own
baseline
- Description
Attributes for the base line.
- Type
- Line
- Source
- options.js, line 9316
basepoint
- Description
Attributes for the base point.
- Type
- Point
- Source
- options.js, line 9329
digits
- Description
Used to round texts given by a number.
- Type
- Number
- Default Value
- 2
- Source
- options.js, line 9398
formatValue
- Description
Function to format the value. If set to null, no formatting will happen.
- Type
- function
- Default Value
- null
- Source
- options.js, line 9453
glider
- Description
Attributes for the gliding helper point.
- Type
- Point
- Source
- options.js, line 9303
label
- Description
Attributes for the slope triangle label.
- Type
- Label
- Source
- options.js, line 9370
prefix
- Description
String that is displayed before the slope triangle and its unit.
- Type
- String
- Default Value
- ''
- See
- Source
- options.js, line 9431
showPrefix
- Description
Determines whether a prefix is displayed before the slope triangle value and unit.
- Type
- Boolean
- Default Value
- false
- See
- Source
- options.js, line 9409
showSuffix
- Description
Determines whether a suffix is displayed after the slope triangle value and unit.
- Type
- Boolean
- Default Value
- false
- See
- Source
- options.js, line 9420
suffix
- Description
String that is displayed after the slope triangle and its unit.
- Type
- String
- Default Value
- ''
- See
- Source
- options.js, line 9442
tangent
- Description
Attributes for the tangent. The tangent is constructed by slop triangle if the construction is based on a glider, solely.
- Type
- Line
- Source
- options.js, line 9342
toppoint
- Description
Attributes for the top point.
- Type
- Point
- Source
- options.js, line 9357
Inherited
Members
Own
none
Inherited
Methods
Own
DeltaX() → {Number}
Returns δx of the slope triangle, that is the slope of the tangent. This value is less than 0 if the line points to the left.
Returns
- Type
- Number
Details
- Source
- element/slopetriangle.js, line 230
DeltaY() → {Number}
Returns δy of the slope triangle, that is the slope of the tangent. This value is less than 0 if the line points to the bottom.
Returns
- Type
- Number
Details
- Source
- element/slopetriangle.js, line 240
Direction() → {Number}
Returns the direction of the slope triangle, that is the direction of the tangent.
Returns
slope of the tangent.
- Type
- Number
Details
- Overrides
- JXG.Line#Direction
- See
- Source
- element/slopetriangle.js, line 250
Slope() → {Number}
Returns the slope of the tangent.
Returns
slope of the tangent.
- Type
- Number
Details
- Overrides
- JXG.Line#Slope
- Source
- element/slopetriangle.js, line 205
getAngle(unitopt) → {Number}
Returns the angle between the tangent and the x-axis.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
unit |
String |
<optional> |
'radians'
|
Unit of the returned values. Possible units are
|
Returns
- Type
- Number
Details
- Overrides
- JXG.Line#getAngle
- Source
- element/slopetriangle.js, line 214
Inherited
Events
Own
none
Inherited
Throws
-
If the element cannot be constructed with the given parent objects an exception is thrown.
- Type
- Error
Details
- Type
- JXG.Polygon
- Source
- element/slopetriangle.js, line 77