JavaScript must be enabled in order for you to use JSXGraph and JSXGraph reference. However, it seems JavaScript is either disabled or not supported by your browser.

Class Index | File Index

Elements

Classes


Element Angle

JXG.GeometryElement
   ↳ JXG.Curve
      ↳ Sector
            ↳ Angle

The angle element is used to denote an angle defined by three points. Visually it is just a Sector element with a radius not defined by the parent elements but by an attribute radius. As opposed to the sector, an angle has two angle points and no radius point. Sector is displayed if type=="sector". If type=="square", instead of a sector a parallelogram is displayed. In case of type=="auto", a square is displayed if the angle is near orthogonal. If no name is provided the angle label is automatically set to a lower greek letter.

Defined in: sector.js.
Extends Sector.

Element Summary
Constructor Attributes Constructor Name and Description
 
Attributes Summary
Field Attributes Field Name and Description
 
Sensitivity (in degrees) to declare an angle as right angle.
 
Display type of the angle field in case of a right angle.
 
Radius of the sector, displaying the angle.
 
Display type of the angle field.
Field Summary
Field Attributes Field Name and Description
 
dot
Indicates a right angle.
 
The point defining the radius of the angle element.
 
Helper point for angles of type 'square'.
Method Summary
Method Attributes Method Name and Description
 
free()
Frees an angle from a prescribed value.
 
setAngle(val)
Set an angle to a prescribed value given in radians.
 
Returns the value of the angle in Radians.
Methods borrowed from class Sector:
hasPointSector, Radius
Methods borrowed from class JXG.Curve:
_borderCase, _insertPoint, _intersectWithBorder, _isOutside, _isUndefined, _plotRecursive, _triangleDists, addTransform, allocatePoints, checkReal, generateTerm, hasPoint, interpolationFunctionFromArray, isDistOK, isSegmentDefined, isSegmentOutside, maxX, minX, notifyParents, update, updateCurve, updateDataArray, updateParametricCurve, updateParametricCurveNaive, updateParametricCurveOld, updateRenderer, updateTransform, X, Y, Z
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addParents, addRotation, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints
Events borrowed from class JXG.GeometryElement:
attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Element Detail
Angle
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create with type "angle".

Possible parent array combinations are:
{JXG.Point} p1
{JXG.Point} p2
{JXG.Point} p1

An angle is always drawn counterclockwise from p1 to p3 around p2. Second possibility of input parameters are:



line2, coords1 or direction1, coords2 or direction2, radius The angle is defined by two lines. The two legs which define the angle are given by two coordinate arrays. The points given by these coordinate arrays are projected initially (i.e. only once) onto the two lines. The other possibility is to supply directions (+/- 1).


Throws:
{Error}
If the element cannot be constructed with the given parent objects an exception is thrown. First possiblity of input parameters are:
Examples:
// Create an angle out of three free points
var p1 = board.create('point', [5.0, 3.0]),
    p2 = board.create('point', [1.0, 0.5]),
    p3 = board.create('point', [1.5, 5.0]),

    a = board.create('angle', [p1, p2, p3]),
    t = board.create('text', [4, 4, function() { return a.Value().toFixed(2); }]);

				
				
// Create an angle out of two lines and two directions
var p1 = board.create('point', [-1, 4]),
 p2 = board.create('point', [4, 1]),
 q1 = board.create('point', [-2, -3]),
 q2 = board.create('point', [4,3]),

 li1 = board.create('line', [p1,p2], {strokeColor:'black', lastArrow:true}),
 li2 = board.create('line', [q1,q2], {lastArrow:true}),

 a1 = board.create('angle', [li1, li2, [5.5, 0], [4, 3]], { radius:1 }),
 a2 = board.create('angle', [li1, li2, 1, -1], { radius:2 });



				
                
Attribute Detail
{Number} orthoSensitivity
Sensitivity (in degrees) to declare an angle as right angle. If the angle measure is inside this distance from a rigth angle, the orthoType of the angle is used for display.
Defined in: options.js.
See:
Angle#orthoType
Default Value:
1.0

{String} orthoType
Display type of the angle field in case of a right angle. Possible values are 'sector' or 'sectordot' or 'square' or 'none'.
Defined in: options.js.
See:
Angle#orthoSensitivity
Default Value:
square

{Number} radius
Radius of the sector, displaying the angle.
Defined in: options.js.
Default Value:
0.5

{String} type
Display type of the angle field. Possible values are 'sector' or 'sectordot' or 'square' or 'none'.
Defined in: options.js.
Default Value:
'sector'
Field Detail
{JXG.Point} dot
Indicates a right angle. Invisible by default, use dot.visible: true to show. Though this dot indicates a right angle, it can be visible even if the angle is not a right one.

{JXG.Point} point
The point defining the radius of the angle element. Alias for Angle.prototype#radiuspoint.

{JXG.Point} pointsquare
Helper point for angles of type 'square'.
Method Detail
{Object} free()
Frees an angle from a prescribed value. This is only relevant if the angle size has been set by setAngle() previously. The anglepoint is set to a free point.
Returns:
{Object} Pointer to the angle element..

{Object} setAngle(val)
Set an angle to a prescribed value given in radians. This is only possible if the third point of the angle, i.e. the anglepoint is a free point.
Parameters:
{Number|Function} val
Number or Function which returns the size of the angle in Radians
Returns:
{Object} Pointer to the angle element..
Examples:
var p1, p2, p3, c, a, s;

p1 = board.create('point',[0,0]);
p2 = board.create('point',[5,0]);
p3 = board.create('point',[0,5]);

c1 = board.create('circle',[p1, p2]);

a = board.create('angle',[p2, p1, p3], {radius:3});

a.setAngle(function() {
    return Math.PI / 3;
});
board.update();


					
					
var p1, p2, p3, c, a, s;

p1 = board.create('point',[0,0]);
p2 = board.create('point',[5,0]);
p3 = board.create('point',[0,5]);

c1 = board.create('circle',[p1, p2]);

a = board.create('angle',[p2, p1, p3], {radius:3});
s = board.create('slider',[[-2,1], [2,1], [0, Math.PI*0.5, 2*Math.PI]]);

a.setAngle(function() {
    return s.Value();
});
board.update();


					
					

{Number} Value()
Returns the value of the angle in Radians.
Returns:
{Number} The angle value in Radians

Attributes borrowed from other Elements
Attributes borrowed from class Sector:
anglepoint, arc, center, label, radiuspoint
Attributes borrowed from class JXG.GeometryElement:
dash, draft, fillColor, fillOpacity, fixed, frozen, highlight, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, needsRegularUpdate, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, trace, traceAttributes, visible, withLabel

Fields borrowed from other Elements
Fields borrowed from class Sector:
point1, point2, point3, point4
Fields borrowed from class JXG.Curve:
dataX, dataY, numberPoints, qdt
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, descendants, dump, elementClass, elType, hasLabel, highlighted, id, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, stdform, subs, symbolic, traces, transformations, visProp

Methods borrowed from other Elements
Methods borrowed from class Sector:
hasPointSector, Radius
Methods borrowed from class JXG.Curve:
_borderCase, _insertPoint, _intersectWithBorder, _isOutside, _isUndefined, _plotRecursive, _triangleDists, addTransform, allocatePoints, checkReal, generateTerm, hasPoint, interpolationFunctionFromArray, isDistOK, isSegmentDefined, isSegmentOutside, maxX, minX, notifyParents, update, updateCurve, updateDataArray, updateParametricCurve, updateParametricCurveNaive, updateParametricCurveOld, updateRenderer, updateTransform, X, Y, Z
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addParents, addRotation, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints

Events borrowed from other Elements
Events borrowed from class JXG.GeometryElement:
attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jul 05 2016 11:01:12 GMT+0200 (CEST)