# JSXGraph Reference

## 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

- _global_
- Angle
- Arc
- Arrow
- Arrowparallel
- Axis
- Bisector
- Bisectorlines
- Button
- Checkbox
- Circle
- Circumcenter
- Circumcircle
- CircumcircleArc
- CircumcircleSector
- Conic
- Curve
- Ellipse
- Functiongraph
- Glider
- Grid
- Group
- Hatch
- Hyperbola
- Image
- Incenter
- Incircle
- Inequality
- Input
- Integral
- Intersection
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.C
- JXG.CA
- JXG.CanvasRenderer
- JXG.Circle
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.CoordsElement
- JXG.Curve
- JXG.Dump
- JXG.EventEmitter
- JXG.GeometryElement
- JXG.GeonextParser
- JXG.Group
- JXG.Image
- JXG.JessieCode
- JXG.JSXGraph
- JXG.Line
- JXG.Math
- JXG.Math.Geometry
- JXG.Math.Numerics
- JXG.Math.Poly
- JXG.Math.Poly.Monomial
- JXG.Math.Poly.Polynomial
- JXG.Math.Poly.Ring
- JXG.Math.Statistics
- JXG.Math.Symbolic
- JXG.NoRenderer
- JXG.Options
- JXG.Point
- JXG.Polygon
- JXG.Server
- JXG.Server.modules
- JXG.SVGRenderer
- JXG.Text
- JXG.Ticks
- JXG.Transformation
- JXG.Turtle
- JXG.Util
- JXG.Util.Base64
- JXG.Util.Unzip
- JXG.Util.UTF8
- JXG.VMLRenderer
- JXG.XML
- Label
- Line
- Locus
- MajorArc
- MajorSector
- Midpoint
- MinorArc
- MinorSector
- Mirrorpoint
- NonReflexAngle
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelpoint
- Perpendicular
- PerpendicularPoint
- PerpendicularSegment
- Point
- PolarLine
- PolePoint
- Polygon
- Quadtree
- RadicalAxis
- Reflection
- ReflexAngle
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Slopetriangle
- Spline
- Stepfunction
- Tangent
- Tapemeasure
- Text
- Ticks
- Tracecurve
- Transformation
- Turtle

# Class 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.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Sector(p1,p2,p1, line,)

Fields borrowed from class JXG.Curve:
  dataX, dataY, numberPoints, qdt
Fields borrowed from class JXG.GeometryElement:
  _org_type, _pos, ancestors, baseElement, board, childElements, dash, descendants, draft, dump, elementClass, elType, fillColor, fillOpacity, fixed, frozen, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, transitionDuration, type, visible, visProp, visPropCalc, withLabel

Field Summary
Field Attributes | Field Name and Description
--- | ---
| anglepoint Attributes for helper point anglepoint in case it is provided by coordinates.
| arc Attributes for sub-element arc.
| center Attributes for helper point center in case it is provided by coordinates.
| label Attributes for the sector label.
| point1 Midpoint of the sector.
| point2 This point together with Sector#point1 defines the radius.
| point3 Defines the sector's angle.
| point4 Defines the sectors orientation in case of circumCircleSectors.
| radiuspoint Attributes for helper point radiuspoint in case it is provided by coordinates.

Fields borrowed from class JXG.Curve:
  dataX, dataY, numberPoints, qdt
Fields borrowed from class JXG.GeometryElement:
  _org_type, _pos, ancestors, baseElement, board, childElements, dash, descendants, draft, dump, elementClass, elType, fillColor, fillOpacity, fixed, frozen, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, transitionDuration, type, visible, visProp, visPropCalc, withLabel

Method Summary
Method Attributes | Method Name and Description
--- | ---
| hasPointSector(x, y) Checks whether (x,y) is within the area defined by the sector.
| Radius() Returns the radius of the sector.

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, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints, updateVisibility

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

Class Detail
Sector(p1,p2,p1, line,)

Parameters:
{JXG.Point_JXG.Point_JXG.Point} p1,p2,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:
{JXG.Line_JXG.Line_array|number_array|number_number|function} line,
  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
{Point} anglepoint
Attributes for helper point anglepoint in case it is provided by coordinates.
Defined in: options.js.

{Arc} arc
Attributes for sub-element arc. It is only available, if the sector is defined by three points.
Defined in: options.js.

{Point} center
Attributes for helper point center in case it is provided by coordinates.
Defined in: options.js.

{Label} label
Attributes for the sector label.
Defined in: options.js.

{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.

{Point} radiuspoint
Attributes for helper point radiuspoint in case it is provided by coordinates.
Defined in: options.js.
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.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 23 2017 17:12:48 GMT-0000 (UTC)