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

- Angle
- Arc
- Arrow
- Arrowparallel
- Axes3D
- Axis
- Axis3D
- Bisector
- Bisectorlines
- Boxplot
- Button
- Cardinalspline
- Chart
- Checkbox
- Circle
- Circle3D
- Circumcenter
- Circumcircle
- CircumcircleArc
- CircumcircleSector
- Comb
- Conic
- Curve
- Curve3D
- CurveDifference
- CurveIntersection
- CurveUnion
- Derivative
- Ellipse
- ForeignObject
- Functiongraph
- Functiongraph3D
- Glider
- Grid
- Group
- Hatch
- Hyperbola
- Image
- ImplicitCurve
- Incenter
- Incircle
- Inequality
- Input
- Integral
- Intersection
- IntersectionCircle3D
- IntersectionLine3D
- Label
- Legend
- Line
- Line3D
- Locus
- MajorArc
- MajorSector
- Measurement
- Mesh3D
- Metapostspline
- Midpoint
- MinorArc
- MinorSector
- mirrorelement
- Mirrorpoint
- NonReflexAngle
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelogram
- Parallelpoint
- ParametricSurface3D
- Perpendicular
- PerpendicularPoint
- PerpendicularSegment
- Point
- Point3D
- PolarLine
- PolePoint
- Polygon
- PolygonalChain
- RadicalAxis
- Reflection
- ReflexAngle
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Slopefield
- Slopetriangle
- Smartlabel
- Sphere3D
- Spline
- Stepfunction
- Tangent
- TangentTo
- Tapemeasure
- Text
- Text3D
- Ticks
- Ticks3D
- Tracecurve
- Transformation
- Turtle
- Vectorfield
- Vectorfield3D
- View3D

Classes

- _global_
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.Board.infobox
- JXG.C
- JXG.CA
- JXG.CanvasRenderer
- JXG.Chart
- JXG.Circle
- JXG.Circle3D
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.CoordsElement
- JXG.Curve
- JXG.Curve3D
- JXG.Dump
- JXG.EventEmitter
- JXG.Expect
- JXG.ForeignObject
- JXG.GeometryElement
- JXG.GeometryElement3D
- JXG.GeonextParser
- JXG.Group
- JXG.Image
- JXG.JessieCode
- JXG.JSXGraph
- JXG.Legend
- JXG.Line
- JXG.Line3D
- JXG.Math
- JXG.Math.BoxQuadtree
- JXG.Math.Clip
- JXG.Math.Extrapolate
- JXG.Math.Geometry
- JXG.Math.ImplicitPlot
- JXG.Math.IntervalArithmetic
- JXG.Math.Metapost
- JXG.Math.Nlp
- JXG.Math.Numerics
- JXG.Math.Plot
- JXG.Math.Poly
- JXG.Math.Poly.Monomial
- JXG.Math.Poly.Polynomial
- JXG.Math.Poly.Ring
- JXG.Math.ProbFuncs
- JXG.Math.Quadtree
- JXG.Math.Statistics
- JXG.Math.Symbolic
- JXG.NoRenderer
- JXG.Options
- JXG.Plane3D
- JXG.Point
- JXG.Point3D
- JXG.Polygon
- JXG.Polygon3D
- JXG.PrefixParser
- JXG.Server
- JXG.Server.modules
- JXG.Sphere3D
- JXG.Surface3D
- JXG.SVGRenderer
- JXG.Text
- JXG.Text3D
- JXG.Ticks
- JXG.Transformation
- JXG.Turtle
- JXG.Util
- JXG.Util.Base64
- JXG.Util.Unzip
- JXG.Util.UTF8
- JXG.View3D
- JXG.VMLRenderer
- JXG.XML

# Class JXG.Math.BoxQuadtree

↳ JXG.Math.BoxQuadtree

Defined in: bqdt.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| JXG.Math.BoxQuadtree(depth, capacity, bbox) Instantiate a new box quadtree.

Field Summary
Field Attributes | Field Name and Description
--- | ---
<private> | bbox Bounding box [left, top, right, bottom].
<private> | capacity Capacity of the box quadtree node
<private> | cx x-coordinate of bounding box center.
<private> | cy y-coordinate of bounding box center.
<private> | depth Maximum depth of the box quadtree node
<private> | items Item storage.
<private> | northEast In a subdivided quadtree this represents the top right subtree.
<private> | northWest In a subdivided quadtree this represents the top left subtree.
<private> | southEast In a subdivided quadtree this represents the bottom right subtree.
<private> | southWest In a subdivided quadtree this represents the bottom left subtree.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| analyzeTree() Analyze the box quadtree.
| find(box) Find all entries of the box quadtree which have an overlap with the given rectangle (AABB).
| insert(items) Insert an array of items into the box quadtree.
| insertItem(it) Insert an item into the box quadtree, where an item is an object containing at least the properties xlb: lower bound on x xub: upper bound on x ylb: lower bound on y yub: upper bound on y which define the axis-aligned bounding box (AABB) of that item.
| plot() Generate data to plot the box quadtree as curve using updateDataArray.
<private> | subdivide(nw_it, sw_it, ne_it, se_it, l, t, r, b) Create the sub-quadrants if necessary, recursively

Class Detail
JXG.Math.BoxQuadtree(depth, capacity, bbox)
Instantiate a new box quadtree. A box quadtree stores AABBs, i.e. axis-aligned bounding boxes. The box quadtree has four sub-quadtress which maybe null if not needed.

Parameters:
{Number} depth
  Maximum recursion depth.
{Number} capacity
  Maximum number of items stored in this node.
{Array} bbox Optional
  Optional bounding box of the box quadtree. If not given, the bounding box is determined by the items in the insert method. This will only work correctly if the first call of insert contains the maximum bounding box.

Field Detail
<private> {Array} bbox
Bounding box [left, top, right, bottom].

<private> {Number} capacity
Capacity of the box quadtree node

<private> {Number} cx
x-coordinate of bounding box center.

<private> {Number} cy
y-coordinate of bounding box center.

<private> {Number} depth
Maximum depth of the box quadtree node

<private> {Array} items
Item storage.

<private> {JXG.Math.BoxQuadtree} northEast
In a subdivided quadtree this represents the top right subtree.

<private> {JXG.Math.BoxQuadtree} northWest
In a subdivided quadtree this represents the top left subtree.

<private> {JXG.Math.BoxQuadtree} southEast
In a subdivided quadtree this represents the bottom right subtree.

<private> {JXG.Math.BoxQuadtree} southWest
In a subdivided quadtree this represents the bottom left subtree.
Method Detail
{Object} analyzeTree()
Analyze the box quadtree.

Returns:
  {Object} data about the box quadtree

{Array} find(box)
Find all entries of the box quadtree which have an overlap with the given rectangle (AABB). Items may appear multiple times.

Parameters:
{Array} box
  AABB of the form [l, t, r, b]

Returns:
  {Array} list of items overlapping with box

{Object} insert(items)
Insert an array of items into the box quadtree. An item is an object containing at least the properties

- xlb: lower bound on x
- xub: upper bound on x
- ylb: lower bound on y
- yub: upper bound on y

which define the axis-aligned bounding box (AABB) of that item. Additionally, more properties can be given.

Parameters:
{Array} items
  to be inserted

Returns:
  {Object} reference to the box quadtree

{Object} insertItem(it)
Insert an item into the box quadtree, where an item is an object containing at least the properties

- xlb: lower bound on x
- xub: upper bound on x
- ylb: lower bound on y
- yub: upper bound on y

which define the axis-aligned bounding box (AABB) of that item. Additionally, more properties can be given.

Parameters:
{Object} it
  Item to be inserted

Returns:
  {Object} reference to the box quadtree

{Array} plot()
Generate data to plot the box quadtree as curve using updateDataArray.

Returns:
  {Array} containing arrays dataX and dataY

Examples:

    // qdt contains a BoxQuadtree

    var qdtcurve = board.create('curve', [[], []], { strokeWidth: 1, strokeColor: '#0000ff', strokeOpacity: 0.3 });
    qdtcurve.updateDataArray = function () {
       var ret = qdt.plot();

       this.dataX = ret[0];
       this.dataY = ret[1];
       console.log(qdt.analyzeTree());
    };
    board.update();

<private> {Object} subdivide(nw_it, sw_it, ne_it, se_it, l, t, r, b)
Create the sub-quadrants if necessary, recursively

Parameters:
{Array} nw_it
  list of items for northWest subtree
{Array} sw_it
  list of items for southWest subtree
{Array} ne_it
  list of items for northEast subtree
{Array} se_it
  list of items for southEast subtree
{Number} l
  bounding box left
{Number} t
  bounding box top
{Number} r
  bounding box right
{Number} b
  bounding box bottom

Returns:
  {Object} reference to the box quadtree

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 02 2024 09:14:35 GMT+0200 (Mitteleuropäische Sommerzeit)