# Difference between revisions of "Tape measure"

From JSXGraph Wiki

Jump to navigationJump to searchA WASSERMANN (talk | contribs) (Created page with "<jsxgraph height="500" width="500" box="box"> var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-3,3,3,-3]}); var p1 = board.create('point', [0,0]); var p2 = board.create(...") |
A WASSERMANN (talk | contribs) |
||

(3 intermediate revisions by the same user not shown) | |||

Line 1: | Line 1: | ||

<jsxgraph height="500" width="500" box="box"> | <jsxgraph height="500" width="500" box="box"> | ||

− | var board = JXG.JSXGraph.initBoard('box', {boundingbox: [- | + | var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-1,3,3,-1], axis:true}); |

var p1 = board.create('point', [0,0]); | var p1 = board.create('point', [0,0]); | ||

var p2 = board.create('point', [1,1]); | var p2 = board.create('point', [1,1]); | ||

var p3 = board.create('point', [2,1]); | var p3 = board.create('point', [2,1]); | ||

− | var tape = board.create('tapemeasure', [[ | + | var tape = board.create('tapemeasure', [[0, 2], [2, 2]], {name:'dist'}); |

</jsxgraph> | </jsxgraph> | ||

Line 10: | Line 10: | ||

<source lang="javascript"> | <source lang="javascript"> | ||

+ | var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-1,3,3,-1], axis:true}); | ||

+ | var p1 = board.create('point', [0,0]); | ||

+ | var p2 = board.create('point', [1,1]); | ||

+ | var p3 = board.create('point', [2,1]); | ||

+ | var tape = board.create('tapemeasure', [[0, 2], [2, 2]], {name:'dist'}); | ||

</source> | </source> | ||

[[Category::Examples]] | [[Category::Examples]] | ||

[[Category::Geometry]] | [[Category::Geometry]] |

## Latest revision as of 12:34, 14 March 2013

### The JavaScript code

```
var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-1,3,3,-1], axis:true});
var p1 = board.create('point', [0,0]);
var p2 = board.create('point', [1,1]);
var p3 = board.create('point', [2,1]);
var tape = board.create('tapemeasure', [[0, 2], [2, 2]], {name:'dist'});
```

[[Category::Examples]] [[Category::Geometry]]