Class Line
Extends
JXG.Line.
This element is used to provide a constructor for a general line. A general line is given by two points. By setting additional properties
a line can be used as an arrow and/or axis.
Defined in: Line.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Line(point1,point2, a,b,c)
|
- Fields borrowed from class JXG.Line:
- defaultTicks, firstArrow, lastArrow, point1, point2, straightFirst, straightLast, ticks
- Fields borrowed from class JXG.GeometryElement:
- ancestors, board, childElements, dash, descendants, draft, fillColor, fillOpacity, fixed, hasLabel, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isReal, layer, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, symbolic, trace, traces, transformations, visible, visProp
- Methods borrowed from class JXG.Line:
- addTicks, addTransform, cloneToBackground, getRise, getSlope, hasPoint, removeAllTicks, removeTicks, setPosition, X, Y, Z
- Methods borrowed from class JXG.GeometryElement:
- addChild, addLabelToElement, animate, clearTrace, hideElement, highlight, labelColor, noHighlight, remove, setArrow, setProperty, showElement, update
Class Detail
Line(point1,point2, a,b,c)
// Create a line using point and coordinates/ // The second point will be fixed and invisible. var p1 = board.create('point', [4.5, 2.0]); var l1 = board.create('line', [p1, [1.0, 1.0]]);
// Create a point using three coordinates var l1 = board.create('line', [1.0, -2.0, 3.0]);
- Parameters:
- {JXG.Point|array_JXG.Point|array} point1,point2
- Parent elements can be two 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.
- {number_number_number} a,b,c
- A line can also be created providing three numbers. The line is then described by the set of solutions of the equation a*x+b*y+c*z = 0.
- Throws:
- {Exception}
- If the element cannot be constructed with the given parent objects an exception is thrown.