Usage (signatures)
board.create('minorarc', [center, p1, p2]);
Draw a circle arc around center through p1. The arc is drawn counter-clockwise from p1 to p2.
Parameters
| Name | Type | Description |
|---|---|---|
center |
PointLike | |
p1 |
PointLike | |
p2 |
PointLike |
Examples
// Create an arc out of three free points
var p1 = board.create('point', [2.0, 2.0]);
var p2 = board.create('point', [1.0, 0.5]);
var p3 = board.create('point', [3.5, 1.0]);
var a = board.create('arc', [p1, p2, p3]);
board.create('text',[1,6,function(){return 'arclength: '+Math.round(a.Value()*100)/100}])
var t = board.create('transform', [2, 1.5], {type: 'scale'});
var a1 = board.create('arc', [[1, 1], [0, 1], [1, 0]], {strokeColor: 'red'});
var a2 = board.create('curve', [a1, t], {strokeColor: 'red'});
Attributes
Own
none
Inherited
Example
// Create a minor arc out of three free points
var center = board.create('point', [2.0, 2.0]);
var p1 = board.create('point', [1.0, 0.5]);
var p2 = board.create('point', [3.5, 1.0]);
var a = board.create('minorarc', [center, p1, p2]);
Throws
-
If the element cannot be constructed with the given parent objects an exception is thrown.
- Type
- Error
Details
- Type
- JXG.Curve
- Source
- element/arc.js, line 639