[Squeakland] Discovering Pi in Squeak

Alan Kay alan.kay at squeakland.org
Thu May 31 05:48:04 PDT 2007


Hi Subbu --

And of course Pi is not at all required for "turn by" or "forward". 
It is one of many constants in the init method for float but is not 
needed for these behaviors. "foo turn by ang" is easily written in 
Etoys as "foo heading increase by ang" where "heading" is a simple 
property, so there is no Pi involved here. "foo forward by 5" is more 
complicated (because it involves a vector addition to foo's location) 
but still requires no Pi.

The other thing to think about that if it was "vectors all the way 
down to the display" (as indeed it was in the old days of 
calligraphic displays) then one would have a direct analog to a 
coordinate free system in the hardware. The artifact today of having 
to supply the display machinery with a 2D array of pixels forces a 
kind of transformation and a kind of coordinate system, but still 
doesn't require Pi.

Cheers,

Alan

At 12:21 PM 5/30/2007, Bert Freudenberg wrote:

>On May 30, 2007, at 19:02 , subbukk wrote:
>
> > On Wednesday 30 May 2007 5:35 pm, Alan Kay wrote:
> >> Hi --
> >> For example, you can make a big circle with a turn by 1 and sum the
> >> forwards, and also remember max y and min y to get the diameter. This
> >> will give you a pretty good value for Pi.
> > Unfortunately, what they will discover is the number programmed
> > into the Float
> > class initialize method :-). I wanted to explore a method without
> > built in
> > bias.
>
>I bet if they are able to trace from the "turn by" tile into the
>method where pi is actually used directly, they are able to
>understand why this is not cheating. Besides, you could use radians
>directly for turning and then pi would not be involved directly.
>
>It's like your "blacksmith" argument - he doesn't actually need pi
>but could simply roll the wheel on the strip of metal to find the
>length. But that would be cheating because pi is built into the
>wheel, yes?
>
>- Bert -
>
>
>_______________________________________________
>Squeakland mailing list
>Squeakland at squeakland.org
>http://squeakland.org/mailman/listinfo/squeakland



More information about the Squeakland mailing list