# Difference between revisions of "Rectangles"

From JSXGraph Wiki

Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||

Line 16: | Line 16: | ||

<jsxgraph width="300" height="300" box="box2"> | <jsxgraph width="300" height="300" box="box2"> | ||

(function() { | (function() { | ||

− | var b2 = JXG.JSXGraph.initBoard('box2', {boundingbox: [-5, 5, 5, -5] | + | var b2 = JXG.JSXGraph.initBoard('box2', {boundingbox: [-5, 5, 5, -5], grid:true}); |

var p1 = b2.create('point', [-2,-2]), | var p1 = b2.create('point', [-2,-2]), | ||

p2 = b2.create('point', [3,3]), | p2 = b2.create('point', [3,3]), | ||

Line 24: | Line 24: | ||

t = b2.create('transform', [Math.PI, pm], {type: 'rotate'}), | t = b2.create('transform', [Math.PI, pm], {type: 'rotate'}), | ||

p4 = b2.create('point', [p3, t], {color:'blue'}), | p4 = b2.create('point', [p3, t], {color:'blue'}), | ||

− | rect = b2.create('polygon',[p1,p3,p2,p4],{hasInnerPoints: | + | rect = b2.create('polygon',[p1,p3,p2,p4],{hasInnerPoints:false}); |

})(); | })(); | ||

</jsxgraph> | </jsxgraph> |

## Latest revision as of 15:10, 14 October 2014