[Edu-sig] python fun geometry

Vern Ceder vceder at canterburyschool.org
Thu Sep 16 20:52:30 CEST 2010

On Thu, Sep 16, 2010 at 1:46 PM, roberto <roberto03 at gmail.com> wrote:

> Now, i have a geometric question about what the authors write:
> in sec 1.1.2 they say that the following logo code:
>            REPEAT DEG
>                  FORWARD R
>                  RIGHT 1
> produce a circular arc as output, having "DEG" degrees and "R" radius;
> and that it's true, actually;
> if DEG = 180 the arc is a semicircumference and so on...
> But, the "R" in the code is the single step forward the turtle does in
> its path so i can't understand how this R can be seen as the radius of
> the circular arc.
> Any hint is very appreciated.

Going forward 1 pixel and then turning 1 degree (and then repeating 360
times) gives you as close to a circle as you can get on the screen. If you
were go to forward 2 pixels, the circle will be less smooth, but the radius
will be twice the size... and so on...



> roberto
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig

This time for sure!
   -Bullwinkle J. Moose
Vern Ceder, Director of Technology
Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804
vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137

The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20100916/5cec3edb/attachment.html>

More information about the Edu-sig mailing list