Class Index | File Index

Classes


Class Midpoint


Extends JXG.Point.
The midpoint element constructs a point in the middle of two given points.
Defined in: Composition.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Midpoint(p1,p2, l)
A midpoint is given by two points.
Fields borrowed from class JXG.Point:
face, fixed, showInfobox, size, style
Fields borrowed from class JXG.GeometryElement:
ancestors, board, childElements, dash, descendants, draft, fillColor, fillOpacity, hasLabel, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isReal, layer, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, symbolic, trace, traces, transformations, visible, visProp
Methods borrowed from class JXG.Point:
addConstraint, addTransform, cloneToBackground, Dist, makeGlider, moveAlong, moveTo, normalizeFace, remove, setPosition, setPositionByTransform, setPositionDirectly, update, updateTransform, visit, X, Y, Z
Methods borrowed from class JXG.GeometryElement:
addChild, addLabelToElement, animate, clearTrace, hideElement, highlight, labelColor, noHighlight, setArrow, setProperty, showElement
Class Detail
Midpoint(p1,p2, l)
A midpoint is given by two points. It is collinear to the given points and the distance is the same to each of the given points, i.e. it is in the middle of the given points.
// Create base elements: 2 points and 1 line
var p1 = board.create('point', [0.0, 2.0]);
var p2 = board.create('point', [2.0, 1.0]);
var l1 = board.create('segment', [[0.0, 3.0], [3.0, 3.0]]);

var mp1 = board.create('midpoint', [p1, p2]);
var mp2 = board.create('midpoint', [l1]);

				
				
				
				
					
						
Parameters:
{JXG.Point_JXG.Point} p1,p2
The constructed point will be in the middle of p1 and p2.
{JXG.Line} l
The midpoint will be in the middle of JXG.Line#point1 and JXG.Line#point2 of the given line l.
Throws:
{Exception}
If the element cannot be constructed with the given parent objects an exception is thrown.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 00:43:20 GMT-0000 (UTC)