Class Index | File Index

Classes


Class RegularPolygon


Extends JXG.Polygon.
Constructs a regular polygon. It needs two points which define the base line and the number of vertices.
Defined in: Polygon.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
RegularPolygon(p1,p2,n)
Constructs a regular polygon.
Fields borrowed from class JXG.Polygon:
borders, type, vertices, withLines
Fields borrowed from class JXG.GeometryElement:
ancestors, board, childElements, dash, descendants, draft, fillColor, fillOpacity, fixed, 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.Polygon:
cloneToBackground, getTextAnchor, hasPoint, updateRenderer
Methods borrowed from class JXG.GeometryElement:
addChild, addLabelToElement, animate, clearTrace, hideElement, highlight, labelColor, noHighlight, remove, setArrow, setProperty, showElement, update
Class Detail
RegularPolygon(p1,p2,n)
Constructs a regular polygon. It needs two points which define the base line and the number of vertices, or a set of points.
var p1 = board.create('point', [0.0, 2.0]);
var p2 = board.create('point', [2.0, 1.0]);

var pol = board.create('regularpolygon', [p1, p2, 5]);

				
				
var p1 = board.create('point', [0.0, 2.0]);
var p2 = board.create('point', [0.0,-2.0]);
var p3 = board.create('point', [-2.0,0.0]);

var pol = board.create('regularpolygon', [p1, p2, p3]);

				
				
				
				
					
						
Parameters:
{JXG.Point_JXG.Point_Number} p1,p2,n
The constructed regular polygon has n vertices and the base line defined by p1 and p2.
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 Mar 12 2013 19:06:08 GMT-0000 (UTC)