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 Sector

JXG.GeometryElement
   ↳ JXG.Curve
         ↳ Sector

A circular sector is a subarea of the area enclosed by a circle. It is enclosed by two radii and an arc.

Defined in: sector.js.
Extends JXG.Curve.

Element Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
Midpoint of the sector.
 
This point together with Sector#point1 defines the radius.
 
Defines the sector's angle.
 
Defines the sectors orientation in case of circumCircleSectors.
Method Summary
Method Attributes Method Name and Description
 
Checks whether (x,y) is within the area defined by the sector.
 
Returns the radius of the sector.
Methods borrowed from class JXG.Curve:
addTransform, allocatePoints, checkReal, generateTerm, hasPoint, interpolationFunctionFromArray, isDistOK, isSegmentOutside, maxX, minX, notifyParents, setPosition, setPositionDirectly, update, updateCurve, updateDataArray, updateParametricCurve, updateParametricCurveNaive, updateRenderer, updateTransform, Z
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addRotation, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getTextAnchor, getType, hideElement, labelColor, noHighlight, normalize, off, on, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabelText, showElement, triggerEventHandlers
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
Sector
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create with type "sector".

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

A sector is defined by three points: The sector's center p1, a second point p2 defining the radius and a third point p3 defining the angle of the sector. The Sector is always drawn counter clockwise from p2 to p3 Second possibility of input parameters are:



line2, coords1 or direction1, coords2 or direction2, radius The sector is defined by two lines. The two legs which define the sector are given by two coordinates arrays which are project initially two the two lines or by two directions (+/- 1). The last parameter is the radius of the sector.


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 a sector out of three free points
var p1 = board.create('point', [1.5, 5.0]),
    p2 = board.create('point', [1.0, 0.5]),
    p3 = board.create('point', [5.0, 3.0]),

    a = board.create('sector', [p1, p2, p3]);

				
				
// Create a sector out of two lines, two directions and a radius
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}),

 sec1 = board.create('sector', [li1, li2, [5.5, 0], [4, 3], 3]),
 sec2 = board.create('sector', [li1, li2, 1, -1, 4]);


				
                
Field Detail
{JXG.Point} point1
Midpoint of the sector.

{JXG.Point} point2
This point together with Sector#point1 defines the radius..

{JXG.Point} point3
Defines the sector's angle.

{JXG.Point} point4
Defines the sectors orientation in case of circumCircleSectors.
Method Detail
{Boolean} hasPointSector(x, y)
Checks whether (x,y) is within the area defined by the sector.
Parameters:
{Number} x
Coordinate in x direction, screen coordinates.
{Number} y
Coordinate in y direction, screen coordinates.
Returns:
{Boolean} True if (x,y) is within the sector defined by the arc, False otherwise.

{Number} Radius()
Returns the radius of the sector.
Returns:
{Number} The distance between Sector#point1 and Sector#point2.

Attributes borrowed from other Elements
Attributes borrowed from class JXG.Curve:
curveType, handDrawing
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 JXG.Curve:
numberPoints
Fields borrowed from class JXG.GeometryElement:
_pos, addEvent, ancestors, baseElement, board, childElements, descendants, dump, elementClass, elType, eventHandlers, getProperty, hasLabel, highlighted, id, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, rendNode, setProperty, stdform, subs, symbolic, traces, transformations, type, visProp

Methods borrowed from other Elements
Methods borrowed from class JXG.Curve:
addTransform, allocatePoints, checkReal, generateTerm, hasPoint, interpolationFunctionFromArray, isDistOK, isSegmentOutside, maxX, minX, notifyParents, setPosition, setPositionDirectly, update, updateCurve, updateDataArray, updateParametricCurve, updateParametricCurveNaive, updateRenderer, updateTransform, Z
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addRotation, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getTextAnchor, getType, hideElement, labelColor, noHighlight, normalize, off, on, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabelText, showElement, triggerEventHandlers

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 Fri Sep 27 2013 11:32:45 GMT+0200 (CEST)