Differences

This shows you the differences between the selected revision and the current version of the page.

topics:circle_koords_in_robots 2009/08/04 17:55 topics:circle_koords_in_robots 2010/01/31 13:38 current
Line 39: Line 39:
    }     }
} }
 +</code>
 +
 +Same code in PHP:
 +
 +<code>
 +<?php
 +$fd=fopen("sub_pearl-ROBOT.txt", w);
 +
 +fwrite($fd, "start\tNORDDEUTSCHLAND/100/109/21\r\n");
 +
 +$dots=24;
 +$mid_x=102;
 +$mid_y=107;
 +$radius=6;
 +$angel=(2*pi()/$dots);
 +$height=21;
 +
 +for ($i=0; $i<$dots; $i++)
 +{
 +        $xKoord = cos($i*$angel) * $radius + $mid_x;
 +        $yKoord = sin($i*$angel) * $radius + $mid_y;
 +        fwrite($fd, "move\t" . round($xKoord) . "," . round($yKoord) . "," . $height . "\r\n");
 +        fwrite($fd, "pause\t" . $pause . "\r\n");
 +
 +}
 +fclose($fd);
 +
 +?>
</code> </code>
topics/circle_koords_in_robots.1249401315.txt.gz · Last modified: 2009/08/04 17:55 by rebekka
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0