Difference between revisions of "Fractal Polygons"

From JSXGraph Wiki
Jump to navigationJump to search
 
 
(4 intermediate revisions by 2 users not shown)
Line 42: Line 42:
 
</form>
 
</form>
 
</html>
 
</html>
<jsxgraph width="600" height="400" box="box">
+
<jsxgraph width="600" height="600" box="box">
var brd = JXG.JSXGraph.initBoard('box', {originX: 300, originY: 300, unitX: 1, unitY: 1});
+
var brd = JXG.JSXGraph.initBoard('box', {boundingbox: [-250, 250, 250, -250]});
var t = brd.createElement('turtle');
+
var t = brd.create('turtle');
 
function run() {
 
function run() {
 
   brd.suspendUpdate();
 
   brd.suspendUpdate();

Latest revision as of 11:28, 31 January 2013

With turtle graphics it is quite easy to construct regular polygons in a recursive manner.

It is possible to play around with this example: In the last line of the input window there is the command

fracPolygon(5,100,0.4,5);

The meaning of the parameters is

  • 5: number of vertices of the regular polygon,
  • 100: length of a side of the initial polygon,
  • 0.4: shrink factor from one level to the next,
  • 5: number of recursion steps.


References

  • Peter Baptist, Wolfgang Neidhardt, Alfred Wassermann: Symmetry and Regular Polygons, Prispevki k poucevanju Matematike, The Improvement of Mathematics Education in Secondary Schools: A Tempus Project, Maribor 1996.