Class Sector
Extends
JXG.Curve.
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.
Constructor Attributes | Constructor Name and Description |
---|---|
Sector(p1,p2,p1)
|
Field Attributes | Field Name and Description |
---|---|
Midpoint of the sector.
|
|
This point together with Sector#point1 defines the radius.
|
|
Defines the sector's angle.
|
- Fields borrowed from class JXG.Curve:
- curveType, handDrawing, numberPoints
- Fields borrowed from class JXG.GeometryElement:
- addEvent, ancestors, board, childElements, descendants, draft, dump, elementClass, elType, eventHandlers, fillOpacity, fixed, frozen, getAttribute, hasLabel, highlighted, highlightFillOpacity, highlightStrokeOpacity, highlightStrokeWidth, id, isDraggable, isReal, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, scalable, stdform, strokeOpacity, subs, symbolic, trace, traceAttributes, traces, transformations, type, visProp, withLabel
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:
- addTransform, allocatePoints, generateTerm, hasPoint, isDistOK, isSegmentOutside, maxX, minX, notifyParents, setPosition, setPositionDirectly, update, updateCurve, updateDataArray, updateParametricCurve, updateParametricCurveNaive, updateRenderer, updateTransform, Z
- Methods borrowed from class JXG.GeometryElement:
- addChild, addRotation, animate, bounds, clearTrace, cloneToBackground, createLabel, dash, fillColor, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, hideElement, highlight, highlightFillColor, highlightStrokeColor, labelColor, noHighlight, off, on, remove, resolveShortcuts, setArrow, setAttribute, setLabelText, setProperty, shadow, showElement, snapToGrid, strokeColor, strokeWidth, triggerEventHandlers, visible
- 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)
// Create an arc 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]);
- 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
- Throws:
- {Error}
- If the element cannot be constructed with the given parent objects an exception is thrown.
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.
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.